# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2026, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # # Translators: # python-doc bot, 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2026-03-21 16:31+0000\n" "PO-Revision-Date: 2025-09-22 16:49+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Polish (https://app.transifex.com/python-doc/teams/5390/pl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: pl\n" "Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && " "(n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && " "n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" msgid "Python Development Mode" msgstr "" 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 "" 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 "" msgid "See also :ref:`Python debug build `." msgstr "" msgid "Effects of the Python Development Mode" msgstr "" msgid "" "Enabling the Python Development Mode is similar to the following command, " "but with additional effects described below::" msgstr "" msgid "Effects of the Python Development Mode:" msgstr "" msgid "" "Add ``default`` :ref:`warning filter `. The " "following warnings are shown:" msgstr "" msgid ":exc:`DeprecationWarning`" msgstr ":exc:`DeprecationWarning`" msgid ":exc:`ImportWarning`" msgstr ":exc:`ImportWarning`" msgid ":exc:`PendingDeprecationWarning`" msgstr ":exc:`PendingDeprecationWarning`" msgid ":exc:`ResourceWarning`" msgstr ":exc:`ResourceWarning`" msgid "" "Normally, the above warnings are filtered by the default :ref:`warning " "filters `." msgstr "" msgid "" "It behaves as if the :option:`-W default <-W>` command line option is used." msgstr "" 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 "" msgid "Install debug hooks on memory allocators to check for:" msgstr "" msgid "Buffer underflow" msgstr "" msgid "Buffer overflow" msgstr "" msgid "Memory allocator API violation" msgstr "" msgid "Unsafe usage of the GIL" msgstr "" msgid "See the :c:func:`PyMem_SetupDebugHooks` C function." msgstr "" msgid "" "It behaves as if the :envvar:`PYTHONMALLOC` environment variable is set to " "``debug``." msgstr "" msgid "" "To enable the Python Development Mode without installing debug hooks on " "memory allocators, set the :envvar:`PYTHONMALLOC` environment variable to " "``default``." msgstr "" 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 "" 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 "" msgid "" "Enable :ref:`asyncio debug mode `. For example, :mod:" "`asyncio` checks for coroutines that were not awaited and logs them." msgstr "" msgid "" "It behaves as if the :envvar:`PYTHONASYNCIODEBUG` environment variable is " "set to ``1``." msgstr "" msgid "" "Check the *encoding* and *errors* arguments for string encoding and decoding " "operations. Examples: :func:`open`, :meth:`str.encode` and :meth:`bytes." "decode`." msgstr "" 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 "" msgid "The :class:`io.IOBase` destructor logs ``close()`` exceptions." msgstr "" msgid "" "Set the :attr:`~sys.flags.dev_mode` attribute of :data:`sys.flags` to " "``True``." msgstr "" 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 "" 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 "" 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 "" msgid "The :class:`io.IOBase` destructor now logs ``close()`` exceptions." msgstr "" msgid "" "The *encoding* and *errors* arguments are now checked for string encoding " "and decoding operations." msgstr "" msgid "ResourceWarning Example" msgstr "" msgid "" "Example of a script counting the number of lines of the text file specified " "in the command line::" msgstr "" 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 "" msgid "" "Enabling the Python Development Mode displays a :exc:`ResourceWarning` " "warning:" msgstr "" msgid "" "In addition, enabling :mod:`tracemalloc` shows the line where the file was " "opened:" msgstr "" msgid "" "The fix is to close explicitly the file. Example using a context manager::" msgstr "" 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 "" msgid "Bad file descriptor error example" msgstr "" msgid "Script displaying the first line of itself::" msgstr "" msgid "By default, Python does not emit any warning:" msgstr "" msgid "" "The Python Development Mode shows a :exc:`ResourceWarning` and logs a \"Bad " "file descriptor\" error when finalizing the file object:" msgstr "" 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 "" msgid "" "The fix is to remove the ``os.close(fp.fileno())`` line, or open the file " "with ``closefd=False``." msgstr ""