Skip to content

Traducido library/asyncio-extending #2264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 27, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 46 additions & 14 deletions library/asyncio-extending.po
Original file line number Diff line number Diff line change
Expand Up @@ -20,41 +20,53 @@ msgstr ""

#: ../Doc/library/asyncio-extending.rst:6
msgid "Extending"
msgstr ""
msgstr "Extensión"

#: ../Doc/library/asyncio-extending.rst:8
msgid ""
"The main direction for :mod:`asyncio` extending is writing custom *event "
"loop* classes. Asyncio has helpers that could be used to simplify this task."
msgstr ""
"La dirección principal para la extensión :mod:`asyncio` es escribir clases "
"*event loop* personalizadas. Asyncio tiene ayudantes que podrían usarse para "
"simplificar esta tarea."

#: ../Doc/library/asyncio-extending.rst:13
msgid ""
"Third-parties should reuse existing asyncio code with caution, a new Python "
"version is free to break backward compatibility in *internal* part of API."
msgstr ""
"Los terceros deben reutilizar el código asyncio existente con precaución, "
"una nueva versión de Python es gratuita para romper la compatibilidad con "
"versiones anteriores en la parte *internal* de la API."

#: ../Doc/library/asyncio-extending.rst:19
msgid "Writing a Custom Event Loop"
msgstr ""
msgstr "Escribir un bucle de eventos personalizado"

#: ../Doc/library/asyncio-extending.rst:21
msgid ""
":class:`asyncio.AbstractEventLoop` declares very many methods. Implementing "
"all them from scratch is a tedious job."
msgstr ""
":class:`asyncio.AbstractEventLoop` declara muchos métodos. Implementarlos "
"todos desde cero es un trabajo tedioso."

#: ../Doc/library/asyncio-extending.rst:24
msgid ""
"A loop can get many common methods implementation for free by inheriting "
"from :class:`asyncio.BaseEventLoop`."
msgstr ""
"Un bucle puede obtener la implementación de muchos métodos comunes de forma "
"gratuita al heredar de :class:`asyncio.BaseEventLoop`."

#: ../Doc/library/asyncio-extending.rst:27
msgid ""
"In turn, the successor should implement a bunch of *private* methods "
"declared but not implemented in :class:`asyncio.BaseEventLoop`."
msgstr ""
"A su vez, el sucesor debería implementar un montón de métodos *private* "
"declarados pero no implementados en :class:`asyncio.BaseEventLoop`."

#: ../Doc/library/asyncio-extending.rst:30
msgid ""
Expand All @@ -63,94 +75,114 @@ msgid ""
"implemented by inherited class. The ``_make_socket_transport()`` method is "
"not documented and is considered as an *internal* API."
msgstr ""
"Por ejemplo, ``loop.create_connection()`` comprueba los argumentos, resuelve "
"las direcciones DNS y llama a ``loop._make_socket_transport()`` que debería "
"implementar la clase heredada. El método ``_make_socket_transport()`` no "
"está documentado y se considera como una API *internal*."

#: ../Doc/library/asyncio-extending.rst:38
msgid "Future and Task private constructors"
msgstr ""
msgstr "Constructores privados Future y Task"

#: ../Doc/library/asyncio-extending.rst:40
msgid ""
":class:`asyncio.Future` and :class:`asyncio.Task` should be never created "
"directly, please use corresponding :meth:`loop.create_future` and :meth:"
"`loop.create_task`, or :func:`asyncio.create_task` factories instead."
msgstr ""
":class:`asyncio.Future` y :class:`asyncio.Task` nunca deben crearse "
"directamente; en su lugar, utilice las fábricas :meth:`loop.create_future` "
"y :meth:`loop.create_task` o :func:`asyncio.create_task` correspondientes."

#: ../Doc/library/asyncio-extending.rst:44
msgid ""
"However, third-party *event loops* may *reuse* built-in future and task "
"implementations for the sake of getting a complex and highly optimized code "
"for free."
msgstr ""
"Sin embargo, *event loops* de terceros puede *reuse* incorporar futuras "
"implementaciones y tareas con el fin de obtener un código complejo y "
"altamente optimizado de forma gratuita."

#: ../Doc/library/asyncio-extending.rst:47
msgid "For this purpose the following, *private* constructors are listed:"
msgstr ""
msgstr "Para ello se listan los siguientes constructores *private*:"

#: ../Doc/library/asyncio-extending.rst:51
msgid "Create a built-in future instance."
msgstr ""
msgstr "Cree una instancia futura integrada."

#: ../Doc/library/asyncio-extending.rst:53
msgid "*loop* is an optional event loop instance."
msgstr ""
msgstr "*loop* es una instancia de bucle de eventos opcional."

#: ../Doc/library/asyncio-extending.rst:57
msgid "Create a built-in task instance."
msgstr ""
msgstr "Cree una instancia de tarea integrada."

#: ../Doc/library/asyncio-extending.rst:59
msgid ""
"*loop* is an optional event loop instance. The rest of arguments are "
"described in :meth:`loop.create_task` description."
msgstr ""
"*loop* es una instancia de bucle de eventos opcional. El resto de argumentos "
"se describen en la descripción de :meth:`loop.create_task`."

#: ../Doc/library/asyncio-extending.rst:64
msgid "*context* argument is added."
msgstr ""
msgstr "Se agrega el argumento *context*."

#: ../Doc/library/asyncio-extending.rst:69
msgid "Task lifetime support"
msgstr ""
msgstr "Soporte de por vida de tareas"

#: ../Doc/library/asyncio-extending.rst:71
msgid ""
"A third party task implementation should call the following functions to "
"keep a task visible by :func:`asyncio.get_tasks` and :func:`asyncio."
"current_task`:"
msgstr ""
"La implementación de una tarea de terceros debe llamar a las siguientes "
"funciones para mantener una tarea visible para :func:`asyncio.get_tasks` y :"
"func:`asyncio.current_task`:"

#: ../Doc/library/asyncio-extending.rst:76
msgid "Register a new *task* as managed by *asyncio*."
msgstr ""
msgstr "Registre un nuevo *task* como administrado por *asyncio*."

#: ../Doc/library/asyncio-extending.rst:78
msgid "Call the function from a task constructor."
msgstr ""
msgstr "Llame a la función desde un constructor de tareas."

#: ../Doc/library/asyncio-extending.rst:82
msgid "Unregister a *task* from *asyncio* internal structures."
msgstr ""
"Anule el registro de un *task* de las estructuras internas de *asyncio*."

#: ../Doc/library/asyncio-extending.rst:84
msgid "The function should be called when a task is about to finish."
msgstr ""
msgstr "La función debe llamarse cuando una tarea está a punto de finalizar."

#: ../Doc/library/asyncio-extending.rst:88
msgid "Switch the current task to the *task* argument."
msgstr ""
msgstr "Cambie la tarea actual al argumento *task*."

#: ../Doc/library/asyncio-extending.rst:90
msgid ""
"Call the function just before executing a portion of embedded *coroutine* (:"
"meth:`coroutine.send` or :meth:`coroutine.throw`)."
msgstr ""
"Llame a la función justo antes de ejecutar una parte del *coroutine* "
"incrustado (:meth:`coroutine.send` o :meth:`coroutine.throw`)."

#: ../Doc/library/asyncio-extending.rst:95
msgid "Switch the current task back from *task* to ``None``."
msgstr ""
msgstr "Vuelva a cambiar la tarea actual de *task* a ``None``."

#: ../Doc/library/asyncio-extending.rst:97
msgid ""
"Call the function just after :meth:`coroutine.send` or :meth:`coroutine."
"throw` execution."
msgstr ""
"Llame a la función justo después de la ejecución de :meth:`coroutine.send` "
"o :meth:`coroutine.throw`."