# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2021, Python Software Foundation # This file is distributed under the same license as the Python en Español # package. # FIRST AUTHOR , 2021. # msgid "" msgstr "" "Project-Id-Version: Python en Español 3.9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-10-12 19:43+0200\n" "PO-Revision-Date: 2023-11-04 23:14+0100\n" "Last-Translator: Marcos Medrano \n" "Language-Team: \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "Generated-By: Babel 2.13.0\n" "X-Generator: Poedit 3.4\n" #: ../Doc/library/devmode.rst:4 msgid "Python Development Mode" msgstr "Modo de desarrollo de Python" #: ../Doc/library/devmode.rst:8 msgid "" "The Python Development Mode introduces additional runtime checks that are " "too expensive to be enabled by default. It should not be more verbose than " "the default if the code is correct; new warnings are only emitted when an " "issue is detected." msgstr "" "El modo de desarrollo de Python introduce comprobaciones adicionales en " "tiempo de ejecución que son muy costosas para ser activadas por defecto. No " "debería ser más verboso que el predeterminado si el código es correcto; sólo " "se emiten nuevas advertencias cuando se detecta un problema." #: ../Doc/library/devmode.rst:13 msgid "" "It can be enabled using the :option:`-X dev <-X>` command line option or by " "setting the :envvar:`PYTHONDEVMODE` environment variable to ``1``." msgstr "" "Puede activarse mediante la opción de línea de comandos :option:`-X dev <-" "X>` o estableciendo la variable de entorno :envvar:`PYTHONDEVMODE` en ``1``." #: ../Doc/library/devmode.rst:16 msgid "See also :ref:`Python debug build `." msgstr "" "Consulte también :ref:`Compilación de depuración de Python `." #: ../Doc/library/devmode.rst:19 msgid "Effects of the Python Development Mode" msgstr "Efectos del modo de desarrollo de Python" #: ../Doc/library/devmode.rst:21 msgid "" "Enabling the Python Development Mode is similar to the following command, " "but with additional effects described below::" msgstr "" "Activar el modo de desarrollo de Python es similar al siguiente comando, " "pero con efectos adicionales que se describen a continuación::" #: ../Doc/library/devmode.rst:26 msgid "Effects of the Python Development Mode:" msgstr "Efectos del modo de desarrollo de Python:" #: ../Doc/library/devmode.rst:28 msgid "" "Add ``default`` :ref:`warning filter `. The " "following warnings are shown:" msgstr "" "Añadir ``default`` :ref:`filtro de avisos `.Se " "muestran las siguientes advertencias:" #: ../Doc/library/devmode.rst:31 msgid ":exc:`DeprecationWarning`" msgstr ":exc:`DeprecationWarning`" #: ../Doc/library/devmode.rst:32 msgid ":exc:`ImportWarning`" msgstr ":exc:`ImportWarning`" #: ../Doc/library/devmode.rst:33 msgid ":exc:`PendingDeprecationWarning`" msgstr ":exc:`PendingDeprecationWarning`" #: ../Doc/library/devmode.rst:34 msgid ":exc:`ResourceWarning`" msgstr ":exc:`ResourceWarning`" #: ../Doc/library/devmode.rst:36 msgid "" "Normally, the above warnings are filtered by the default :ref:`warning " "filters `." msgstr "" "Normalmente, los advertencias son filtradas por defecto :ref:`warning " "filters `." #: ../Doc/library/devmode.rst:39 msgid "" "It behaves as if the :option:`-W default <-W>` command line option is used." msgstr "" "Se comporta como si se utilizara la opción de línea de comandos :option:`-W " "default <-W>`." #: ../Doc/library/devmode.rst:41 msgid "" "Use the :option:`-W error <-W>` command line option or set the :envvar:" "`PYTHONWARNINGS` environment variable to ``error`` to treat warnings as " "errors." msgstr "" "Utilice la opción de línea de comandos :option:`-W error <-W>` o establezca " "la variable de entorno :envvar:`PYTHONWARNINGS` en ``error`` para tratar las " "advertencias como errores." #: ../Doc/library/devmode.rst:45 msgid "Install debug hooks on memory allocators to check for:" msgstr "" "Instalar hooks(enganches) de depuración en los asignadores de memoria para " "comprobar:" #: ../Doc/library/devmode.rst:47 msgid "Buffer underflow" msgstr "Desbordamiento del búfer" #: ../Doc/library/devmode.rst:48 msgid "Buffer overflow" msgstr "Sobrecarga del búfer" #: ../Doc/library/devmode.rst:49 msgid "Memory allocator API violation" msgstr "Violación de la API del asignador de memoria" #: ../Doc/library/devmode.rst:50 msgid "Unsafe usage of the GIL" msgstr "Uso inseguro del GIL" #: ../Doc/library/devmode.rst:52 msgid "See the :c:func:`PyMem_SetupDebugHooks` C function." msgstr "Ver la función en C :c:func:`PyMem_SetupDebugHooks`." #: ../Doc/library/devmode.rst:54 msgid "" "It behaves as if the :envvar:`PYTHONMALLOC` environment variable is set to " "``debug``." msgstr "" "Se comporta como si la variable de entorno :envvar:`PYTHONMALLOC` estuviera " "establecida en ``debug``." #: ../Doc/library/devmode.rst:57 msgid "" "To enable the Python Development Mode without installing debug hooks on " "memory allocators, set the :envvar:`PYTHONMALLOC` environment variable to " "``default``." msgstr "" "Para activar el modo de desarrollo de Python sin instalar ganchos de " "depuración en los asignadores de memoria, establezca la variable de entorno :" "envvar:`PYTHONMALLOC` a ``default``." #: ../Doc/library/devmode.rst:61 msgid "" "Call :func:`faulthandler.enable` at Python startup to install handlers for " "the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal." "SIGABRT`, :const:`~signal.SIGBUS` and :const:`~signal.SIGILL` signals to " "dump the Python traceback on a crash." msgstr "" "Llama a :func:`faulthandler.enable` al inicio de Python para instalar los " "handlers(manejadores) de las señales :const:`~signal.SIGSEGV`, :const:" "`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS` y :const:" "`~signal.SIGILL` para volcar la traza de Python en caso de fallo." #: ../Doc/library/devmode.rst:66 msgid "" "It behaves as if the :option:`-X faulthandler <-X>` command line option is " "used or if the :envvar:`PYTHONFAULTHANDLER` environment variable is set to " "``1``." msgstr "" "Se comporta como si se utilizara la opción de línea de comandos :option:`-X " "faulthandler <-X>` o si la variable de entorno :envvar:`PYTHONFAULTHANDLER` " "se establece en ``1``." #: ../Doc/library/devmode.rst:70 msgid "" "Enable :ref:`asyncio debug mode `. For example, :mod:" "`asyncio` checks for coroutines that were not awaited and logs them." msgstr "" "Habilitar :ref:`asyncio debug mode `. Por ejemplo, :mod:" "`asyncio` comprueba las corutinas que no fueron esperadas y las registra." #: ../Doc/library/devmode.rst:73 msgid "" "It behaves as if the :envvar:`PYTHONASYNCIODEBUG` environment variable is " "set to ``1``." msgstr "" "Se comporta como si la variable de entorno :envvar:`PYTHONASYNCIODEBUG` " "estuviera establecida en ``1``." #: ../Doc/library/devmode.rst:76 msgid "" "Check the *encoding* and *errors* arguments for string encoding and decoding " "operations. Examples: :func:`open`, :meth:`str.encode` and :meth:`bytes." "decode`." msgstr "" "Comprueba los argumentos *encoding* y *errors* para las operaciones de " "codificación y decodificación de cadenas. Ejemplos: :func:`open`, :meth:`str." "encode` y :meth:`bytes.decode`." #: ../Doc/library/devmode.rst:80 msgid "" "By default, for best performance, the *errors* argument is only checked at " "the first encoding/decoding error and the *encoding* argument is sometimes " "ignored for empty strings." msgstr "" "Por defecto, para un mejor rendimiento, el argumento *errors* sólo se " "comprueba en el primer error de codificación/decodificación y el argumento " "*encoding* a veces se ignora para las cadenas vacías." #: ../Doc/library/devmode.rst:84 msgid "The :class:`io.IOBase` destructor logs ``close()`` exceptions." msgstr "" "El destructor de :class:`io.IOBase` registra las excepciones ``close()``." #: ../Doc/library/devmode.rst:85 msgid "" "Set the :attr:`~sys.flags.dev_mode` attribute of :data:`sys.flags` to " "``True``." msgstr "" "Establece el atributo :attr:`~sys.flags.dev_mode` de :data:`sys.flags` a " "``True``." #: ../Doc/library/devmode.rst:88 msgid "" "The Python Development Mode does not enable the :mod:`tracemalloc` module by " "default, because the overhead cost (to performance and memory) would be too " "large. Enabling the :mod:`tracemalloc` module provides additional " "information on the origin of some errors. For example, :exc:" "`ResourceWarning` logs the traceback where the resource was allocated, and a " "buffer overflow error logs the traceback where the memory block was " "allocated." msgstr "" "El Modo de Desarrollo de Python no habilita el módulo :mod:`tracemalloc` por " "defecto, porque el costo de la sobrecarga (para el rendimiento y la memoria) " "sería demasiado grande. Activar el módulo :mod:`tracemalloc` proporciona " "información adicional sobre el origen de algunos errores. Por ejemplo, :exc:" "`ResourceWarning` registra la traza donde se asignó el recurso, y un error " "de desbordamiento de búfer registra la traza donde se asignó el bloque de " "memoria." #: ../Doc/library/devmode.rst:95 msgid "" "The Python Development Mode does not prevent the :option:`-O` command line " "option from removing :keyword:`assert` statements nor from setting :const:" "`__debug__` to ``False``." msgstr "" "El modo de desarrollo de Python no impide que la opción de línea de " "comandos :option:`-O` elimine las declaraciones :keyword:`assert` ni que " "establezca :const:`__debug__` a ``False``." #: ../Doc/library/devmode.rst:99 msgid "" "The Python Development Mode can only be enabled at the Python startup. Its " "value can be read from :data:`sys.flags.dev_mode `." msgstr "" "El modo de desarrollo de Python solo se puede habilitar en el inicio de " "Python. Su valor se puede leer en :data:`sys.flags.dev_mode `." #: ../Doc/library/devmode.rst:102 msgid "The :class:`io.IOBase` destructor now logs ``close()`` exceptions." msgstr "" "El destructor de :class:`io.IOBase` ahora registra las excepciones " "``close()``." #: ../Doc/library/devmode.rst:105 msgid "" "The *encoding* and *errors* arguments are now checked for string encoding " "and decoding operations." msgstr "" "Los argumentos *enconding* y *errors* se comprueban ahora para las " "operaciones de codificación y descodificación de cadenas." #: ../Doc/library/devmode.rst:111 msgid "ResourceWarning Example" msgstr "Ejemplo de ResourceWarning" #: ../Doc/library/devmode.rst:113 msgid "" "Example of a script counting the number of lines of the text file specified " "in the command line::" msgstr "" "Ejemplo de un script que cuenta el número de líneas del archivo de texto " "especificado en la línea de comandos::" #: ../Doc/library/devmode.rst:127 msgid "" "The script does not close the file explicitly. By default, Python does not " "emit any warning. Example using README.txt, which has 269 lines:" msgstr "" "El script no cierra el archivo explícitamente. Por defecto, Python no emite " "ninguna advertencia. Ejemplo usando README.txt, que tiene 269 líneas:" #: ../Doc/library/devmode.rst:135 msgid "" "Enabling the Python Development Mode displays a :exc:`ResourceWarning` " "warning:" msgstr "" "Al activar el modo de desarrollo de Python aparece una advertencia :exc:" "`ResourceWarning`:" #: ../Doc/library/devmode.rst:145 msgid "" "In addition, enabling :mod:`tracemalloc` shows the line where the file was " "opened:" msgstr "" "Además, al activar :mod:`tracemalloc` se muestra la línea en la que se abrió " "el archivo:" #: ../Doc/library/devmode.rst:160 msgid "" "The fix is to close explicitly the file. Example using a context manager::" msgstr "" "La solución es cerrar explícitamente el archivo. Ejemplo utilizando un " "gestor de contexto::" #: ../Doc/library/devmode.rst:168 msgid "" "Not closing a resource explicitly can leave a resource open for way longer " "than expected; it can cause severe issues upon exiting Python. It is bad in " "CPython, but it is even worse in PyPy. Closing resources explicitly makes an " "application more deterministic and more reliable." msgstr "" "No cerrar un recurso explícitamente puede dejar un recurso abierto durante " "mucho más tiempo del estimado; puede causar graves problemas al salir de " "Python. Es malo en CPython, pero es aún peor en PyPy. Cerrar los recursos " "explícitamente hace que una aplicación sea más detallista y más fiable." #: ../Doc/library/devmode.rst:175 msgid "Bad file descriptor error example" msgstr "Ejemplo de error de descriptor de archivo incorrecto" #: ../Doc/library/devmode.rst:177 msgid "Script displaying the first line of itself::" msgstr "Script que muestra la primera línea de sí mismo::" #: ../Doc/library/devmode.rst:190 msgid "By default, Python does not emit any warning:" msgstr "Por defecto, Python no emite ninguna advertencia:" #: ../Doc/library/devmode.rst:197 msgid "" "The Python Development Mode shows a :exc:`ResourceWarning` and logs a \"Bad " "file descriptor\" error when finalizing the file object:" msgstr "" "El modo de desarrollo de Python muestra un :exc:`ResourceWarning` y registra " "un error \"Bad file descriptor\" cuando termina el objeto archivo:" #: ../Doc/library/devmode.rst:213 msgid "" "``os.close(fp.fileno())`` closes the file descriptor. When the file object " "finalizer tries to close the file descriptor again, it fails with the ``Bad " "file descriptor`` error. A file descriptor must be closed only once. In the " "worst case scenario, closing it twice can lead to a crash (see :issue:" "`18748` for an example)." msgstr "" "``os.close(fp.fileno())`` cierra el descriptor de archivo. Cuando el " "finalizador de objetos de archivo intenta cerrar el descriptor de archivo de " "nuevo, falla con el error ``Bad file descriptor``. Un descriptor de archivo " "debe cerrarse sólo una vez. En el peor de los casos, cerrarlo dos veces " "puede provocar un fallo (ver :issue:`18748` para un ejemplo)." #: ../Doc/library/devmode.rst:219 msgid "" "The fix is to remove the ``os.close(fp.fileno())`` line, or open the file " "with ``closefd=False``." msgstr "" "La solución es eliminar la línea ``os.close(fp.fileno())``, o abrir el " "archivo con ``closefd=False``."