• Home
  • Raw
  • Download

Lines Matching +full:in +full:- +full:development

3 Python Development Mode
8 The Python Development Mode introduces additional runtime checks that are too
13 It can be enabled using the :option:`-X dev <-X>` command line option or by
16 See also :ref:`Python debug build <debug-build>`.
18 Effects of the Python Development Mode
21 Enabling the Python Development Mode is similar to the following command, but
24 PYTHONMALLOC=debug PYTHONASYNCIODEBUG=1 python3 -W default -X faulthandler
26 Effects of the Python Development Mode:
28 * Add ``default`` :ref:`warning filter <describing-warning-filters>`. The
37 filters <describing-warning-filters>`.
39 It behaves as if the :option:`-W default <-W>` command line option is used.
41 Use the :option:`-W error <-W>` command line option or set the
57 To enable the Python Development Mode without installing debug hooks on
65 It behaves as if the :option:`-X faulthandler <-X>` command line option is
69 * Enable :ref:`asyncio debug mode <asyncio-debug-mode>`. For example,
87 The Python Development Mode does not enable the :mod:`tracemalloc` module by
94 The Python Development Mode does not prevent the :option:`-O` command line
98 The Python Development Mode can only be enabled at the Python startup. Its
112 Example of a script counting the number of lines of the text file specified in
129 .. code-block:: shell-session
134 Enabling the Python Development Mode displays a :exc:`ResourceWarning` warning:
136 .. code-block:: shell-session
138 $ python3 -X dev script.py README.txt
140 …:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'>
144 In addition, enabling :mod:`tracemalloc` shows the line where the file was
147 .. code-block:: shell-session
149 $ python3 -X dev -X tracemalloc=5 script.py README.rst
151 …:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'>
168 expected; it can cause severe issues upon exiting Python. It is bad in
169 CPython, but it is even worse in PyPy. Closing resources explicitly makes an
191 .. code-block:: shell-session
196 The Python Development Mode shows a :exc:`ResourceWarning` and logs a "Bad file
199 .. code-block:: shell-session
203 …y:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='script.py' mode='r' encoding='UTF-8'>
206 Exception ignored in: <_io.TextIOWrapper name='script.py' mode='r' encoding='UTF-8'>
208 File "script.py", line 10, in <module>
214 file descriptor`` error. A file descriptor must be closed only once. In the