diff --git a/dictionaries/library_asyncio-dev.txt b/dictionaries/library_asyncio-dev.txt new file mode 100644 index 0000000000..c6feb3bf18 --- /dev/null +++ b/dictionaries/library_asyncio-dev.txt @@ -0,0 +1,5 @@ +callback +callbacks +logger +logueo +Logueando \ No newline at end of file diff --git a/library/asyncio-dev.po b/library/asyncio-dev.po index 04ff67b7c2..ff7a8ba3f6 100644 --- a/library/asyncio-dev.po +++ b/library/asyncio-dev.po @@ -6,68 +6,76 @@ # Check https://github.com/python/python-docs-es/blob/3.8/TRANSLATORS to # get the list of volunteers # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-05 12:54+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2020-10-07 09:13+0200\n" +"Last-Translator: Álvaro Mondéjar \n" +"Language: es\n" "Language-Team: python-doc-es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.8.0\n" +"X-Generator: Poedit 2.4.1\n" #: ../Doc/library/asyncio-dev.rst:7 msgid "Developing with asyncio" -msgstr "" +msgstr "Desarrollando con asyncio" #: ../Doc/library/asyncio-dev.rst:9 msgid "" "Asynchronous programming is different from classic \"sequential\" " "programming." msgstr "" +"La programación asincrónica es diferente a la programación \"secuencial\" " +"clásica." #: ../Doc/library/asyncio-dev.rst:12 msgid "" "This page lists common mistakes and traps and explains how to avoid them." msgstr "" +"Esta página enumera errores y trampas comunes y explica cómo evitarlos." #: ../Doc/library/asyncio-dev.rst:19 msgid "Debug Mode" -msgstr "" +msgstr "Modo Depuración" #: ../Doc/library/asyncio-dev.rst:21 msgid "" "By default asyncio runs in production mode. In order to ease the " "development asyncio has a *debug mode*." msgstr "" +"Por defecto asyncio se ejecuta en modo producción. Para facilitar el " +"desarrollo asyncio tiene un *modo depuración*." #: ../Doc/library/asyncio-dev.rst:24 msgid "There are several ways to enable asyncio debug mode:" -msgstr "" +msgstr "Hay varias maneras de habilitar el modo depuración de asyncio:" #: ../Doc/library/asyncio-dev.rst:26 msgid "Setting the :envvar:`PYTHONASYNCIODEBUG` environment variable to ``1``." msgstr "" +"Definiendo la variable de entorno :envvar:`PYTHONASYNCIODEBUG` a ``1``." #: ../Doc/library/asyncio-dev.rst:28 msgid "Using the :option:`-X` ``dev`` Python command line option." msgstr "" +"Usando la opción :option:`-X` ``dev`` de la línea de comandos de Python." #: ../Doc/library/asyncio-dev.rst:30 msgid "Passing ``debug=True`` to :func:`asyncio.run`." -msgstr "" +msgstr "Pasando ``debug=True`` a :func:`asyncio.run`." #: ../Doc/library/asyncio-dev.rst:32 msgid "Calling :meth:`loop.set_debug`." -msgstr "" +msgstr "Invocando :meth:`loop.set_debug`." #: ../Doc/library/asyncio-dev.rst:34 msgid "In addition to enabling the debug mode, consider also:" -msgstr "" +msgstr "Además de habilitar el modo depuración, considere también:" #: ../Doc/library/asyncio-dev.rst:36 msgid "" @@ -75,6 +83,9 @@ msgid "" "data:`logging.DEBUG`, for example the following snippet of code can be run " "at startup of the application::" msgstr "" +"definir el nivel de log del :ref:`asyncio logger ` a :py:" +"data:`logging.DEBUG`, por ejemplo el siguiente fragmento de código puede ser " +"ejecutado al inicio de la aplicación:" #: ../Doc/library/asyncio-dev.rst:42 msgid "" @@ -82,10 +93,13 @@ msgid "" "warnings. One way of doing that is by using the :option:`-W` ``default`` " "command line option." msgstr "" +"configurando el módulo :mod:`warnings` para mostrar advertencias :exc:" +"`ResourceWarning`. Una forma de hacerlo es usando la opción :option:`-W` " +"``default`` de la línea de comandos." #: ../Doc/library/asyncio-dev.rst:47 msgid "When the debug mode is enabled:" -msgstr "" +msgstr "Cuando el modo depuración está habilitado:" #: ../Doc/library/asyncio-dev.rst:49 msgid "" @@ -93,6 +107,9 @@ msgid "" "not-scheduled>` and logs them; this mitigates the \"forgotten await\" " "pitfall." msgstr "" +"asyncio comprueba las :ref:`corrutinas que no son esperadas ` y las registra; esto mitiga la dificultad de las " +"\"esperas olvidadas\"." #: ../Doc/library/asyncio-dev.rst:53 msgid "" @@ -100,12 +117,17 @@ msgid "" "`loop.call_at` methods) raise an exception if they are called from a wrong " "thread." msgstr "" +"Muchas APIs asyncio que no son seguras para hilos (como los métodos :meth:" +"`loop.call_soon` y :meth:`loop.call_at`) generan una excepción si son " +"llamados desde un hilo equivocado." #: ../Doc/library/asyncio-dev.rst:57 msgid "" "The execution time of the I/O selector is logged if it takes too long to " "perform an I/O operation." msgstr "" +"El tiempo de ejecución del selector E/S es registrado si tarda demasiado " +"tiempo en realizar una operación E/S." #: ../Doc/library/asyncio-dev.rst:60 msgid "" @@ -113,10 +135,13 @@ msgid "" "slow_callback_duration` attribute can be used to set the minimum execution " "duration in seconds that is considered \"slow\"." msgstr "" +"Los callbacks que tardan más de 100ms son registrados. El atributo :attr:" +"`loop.slow_callback_duration` puede ser usado para definir la duración " +"mínima de ejecución en segundos considerada como \"lenta\"." #: ../Doc/library/asyncio-dev.rst:68 msgid "Concurrency and Multithreading" -msgstr "" +msgstr "Concurrencia y Multihilo" #: ../Doc/library/asyncio-dev.rst:70 msgid "" @@ -126,12 +151,19 @@ msgid "" "``await`` expression, the running Task gets suspended, and the event loop " "executes the next Task." msgstr "" +"Un bucle de eventos se ejecuta en un hilo (generalmente el hilo principal) y " +"ejecuta todos los callbacks y las Tareas en su hilo. Mientras una Tarea está " +"ejecutándose en el bucle de eventos, ninguna otra Tarea puede ejecutarse en " +"el mismo hilo. Cuando una Tarea ejecuta una expresión ``await``, la Tarea en " +"ejecución se suspende y el bucle de eventos ejecuta la siguiente Tarea." #: ../Doc/library/asyncio-dev.rst:76 msgid "" "To schedule a callback from a different OS thread, the :meth:`loop." "call_soon_threadsafe` method should be used. Example::" msgstr "" +"Para ejecutar un callback desde un hilo diferente del sistema operativo se " +"debe usar el método :meth:`loop.call_soon_threadsafe`. Ejemplo::" #: ../Doc/library/asyncio-dev.rst:81 msgid "" @@ -140,6 +172,11 @@ msgid "" "a callback. If there's a need for such code to call a low-level asyncio " "API, the :meth:`loop.call_soon_threadsafe` method should be used, e.g.::" msgstr "" +"Casi ningún objeto asyncio es seguro entre hilos (*thread safe*), lo cual " +"generalmente no es un problema a no ser que haya código que trabaje con " +"ellos desde fuera de una Tarea o un callback. Si tal código necesita llamar " +"a la API de asyncio de bajo nivel, se debe usar el método :meth:`loop." +"call_soon_threadsafe`, por ejemplo::" #: ../Doc/library/asyncio-dev.rst:89 msgid "" @@ -147,12 +184,17 @@ msgid "" "`run_coroutine_threadsafe` function should be used. It returns a :class:" "`concurrent.futures.Future` to access the result::" msgstr "" +"Para programar un objeto de corrutina desde una hilo diferente del sistema " +"operativo se debe usar la función :func:`run_coroutine_threadsafe`. Esta " +"retorna un :class:`concurrent.futures.Future` para acceder al resultado::" #: ../Doc/library/asyncio-dev.rst:102 msgid "" "To handle signals and to execute subprocesses, the event loop must be run in " "the main thread." msgstr "" +"Para manejar señales y ejecutar subprocesos, el bucle de eventos debe ser " +"ejecutado en el hilo principal." #: ../Doc/library/asyncio-dev.rst:105 msgid "" @@ -161,10 +203,14 @@ msgid "" "different OS thread without blocking the OS thread that the event loop runs " "in." msgstr "" +"El método :meth:`loop.run_in_executor` puede ser usado con un :class:" +"`concurrent.futures.ThreadPoolExecutor` para ejecutar código bloqueante en " +"un hilo diferente del sistema operativo sin bloquear el hilo del sistema " +"operativo en el que el bucle de eventos está siendo ejecutado." #: ../Doc/library/asyncio-dev.rst:114 msgid "Running Blocking Code" -msgstr "" +msgstr "Ejecutando Código Bloqueante" #: ../Doc/library/asyncio-dev.rst:116 msgid "" @@ -172,6 +218,10 @@ msgid "" "function performs a CPU-intensive calculation for 1 second, all concurrent " "asyncio Tasks and IO operations would be delayed by 1 second." msgstr "" +"Código bloqueante (dependiente de la CPU) no debe ser ejecutado " +"directamente. Por ejemplo, si una función realiza un cálculo intensivo de " +"CPU durante 1 segundo, todas las Tareas y operaciones de Entrada/Salida (IO) " +"concurrentes se retrasarían 1 segundo." #: ../Doc/library/asyncio-dev.rst:121 msgid "" @@ -179,26 +229,34 @@ msgid "" "different process to avoid blocking the OS thread with the event loop. See " "the :meth:`loop.run_in_executor` method for more details." msgstr "" +"Un ejecutor puede ser usado para ejecutar una tarea en un hilo diferente o " +"incluso en un proceso diferente para evitar bloquear el hilo del sistema " +"operativo con el bucle de eventos. Consulte el método :meth:`loop." +"run_in_executor` para más detalles." #: ../Doc/library/asyncio-dev.rst:130 msgid "Logging" -msgstr "" +msgstr "Logueando" #: ../Doc/library/asyncio-dev.rst:132 msgid "" "asyncio uses the :mod:`logging` module and all logging is performed via the " "``\"asyncio\"`` logger." msgstr "" +"asyncio usa el módulo :mod:`logging` y todo el logueo es realizado mediante " +"el logger ``\"asyncio\"``." #: ../Doc/library/asyncio-dev.rst:135 msgid "" "The default log level is :py:data:`logging.INFO`, which can be easily " "adjusted::" msgstr "" +"El nivel de log por defecto es :py:data:`logging.INFO`, el cual puede ser " +"fácilmente ajustado::" #: ../Doc/library/asyncio-dev.rst:144 msgid "Detect never-awaited coroutines" -msgstr "" +msgstr "Detectar corrutinas no esperadas" #: ../Doc/library/asyncio-dev.rst:146 msgid "" @@ -206,24 +264,29 @@ msgid "" "instead of ``await coro()``) or the coroutine is not scheduled with :meth:" "`asyncio.create_task`, asyncio will emit a :exc:`RuntimeWarning`::" msgstr "" +"Cuando una función de corrutina es invocada, pero no esperada (por ejemplo " +"``coro()`` en lugar de ``await coro()``) o la corrutina no es programada " +"con :meth:`asyncio.create_task`, asyncio emitirá una :exc:`RuntimeWarning`::" #: ../Doc/library/asyncio-dev.rst:161 ../Doc/library/asyncio-dev.rst:206 msgid "Output::" -msgstr "" +msgstr "Salida::" #: ../Doc/library/asyncio-dev.rst:166 ../Doc/library/asyncio-dev.rst:222 msgid "Output in debug mode::" -msgstr "" +msgstr "Salida en modo depuración::" #: ../Doc/library/asyncio-dev.rst:179 msgid "" "The usual fix is to either await the coroutine or call the :meth:`asyncio." "create_task` function::" msgstr "" +"La solución habitual es esperar la corrutina o llamar a la función :meth:" +"`asyncio.create_task`::" #: ../Doc/library/asyncio-dev.rst:187 msgid "Detect never-retrieved exceptions" -msgstr "" +msgstr "Detectar excepciones nunca recuperadas" #: ../Doc/library/asyncio-dev.rst:189 msgid "" @@ -232,13 +295,19 @@ msgid "" "this case, asyncio would emit a log message when the Future object is " "garbage collected." msgstr "" +"Si un :meth:`Future.set_exception` es invocado pero el objeto Futuro nunca " +"es esperado, la excepción nunca será propagada al código del usuario. En " +"este caso, asyncio emitiría un mensaje de registro cuando el objeto Futuro " +"fuera recolectado como basura." #: ../Doc/library/asyncio-dev.rst:194 msgid "Example of an unhandled exception::" -msgstr "" +msgstr "Ejemplo de una excepción no manejada::" #: ../Doc/library/asyncio-dev.rst:217 msgid "" ":ref:`Enable the debug mode ` to get the traceback where " "the task was created::" msgstr "" +":ref:`Habilita el modo depuración ` para obtener el " +"seguimiento de pila (*traceback*) donde la tarea fue creada::"