mirror of
https://github.com/python/cpython.git
synced 2025-10-02 21:25:24 +00:00
GH-83893: Cross reference env. vars and -X command line options (GH-103414)
(cherry picked from commit d65ed693a8
)
Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Co-authored-by: Erlend E. Aasland
This commit is contained in:
parent
9f3f109dd2
commit
4c4ef50ec2
1 changed files with 12 additions and 6 deletions
|
@ -492,7 +492,8 @@ Miscellaneous options
|
||||||
Reserved for various implementation-specific options. CPython currently
|
Reserved for various implementation-specific options. CPython currently
|
||||||
defines the following possible values:
|
defines the following possible values:
|
||||||
|
|
||||||
* ``-X faulthandler`` to enable :mod:`faulthandler`;
|
* ``-X faulthandler`` to enable :mod:`faulthandler`.
|
||||||
|
See also :envvar:`PYTHONFAULTHANDLER`.
|
||||||
* ``-X showrefcount`` to output the total reference count and number of used
|
* ``-X showrefcount`` to output the total reference count and number of used
|
||||||
memory blocks when the program finishes or after each statement in the
|
memory blocks when the program finishes or after each statement in the
|
||||||
interactive interpreter. This only works on :ref:`debug builds
|
interactive interpreter. This only works on :ref:`debug builds
|
||||||
|
@ -500,8 +501,9 @@ Miscellaneous options
|
||||||
* ``-X tracemalloc`` to start tracing Python memory allocations using the
|
* ``-X tracemalloc`` to start tracing Python memory allocations using the
|
||||||
:mod:`tracemalloc` module. By default, only the most recent frame is
|
:mod:`tracemalloc` module. By default, only the most recent frame is
|
||||||
stored in a traceback of a trace. Use ``-X tracemalloc=NFRAME`` to start
|
stored in a traceback of a trace. Use ``-X tracemalloc=NFRAME`` to start
|
||||||
tracing with a traceback limit of *NFRAME* frames. See the
|
tracing with a traceback limit of *NFRAME* frames.
|
||||||
:func:`tracemalloc.start` for more information.
|
See :func:`tracemalloc.start` and :envvar:`PYTHONTRACEMALLOC`
|
||||||
|
for more information.
|
||||||
* ``-X int_max_str_digits`` configures the :ref:`integer string conversion
|
* ``-X int_max_str_digits`` configures the :ref:`integer string conversion
|
||||||
length limitation <int_max_str_digits>`. See also
|
length limitation <int_max_str_digits>`. See also
|
||||||
:envvar:`PYTHONINTMAXSTRDIGITS`.
|
:envvar:`PYTHONINTMAXSTRDIGITS`.
|
||||||
|
@ -516,6 +518,7 @@ Miscellaneous options
|
||||||
* ``-X utf8`` enables the :ref:`Python UTF-8 Mode <utf8-mode>`.
|
* ``-X utf8`` enables the :ref:`Python UTF-8 Mode <utf8-mode>`.
|
||||||
``-X utf8=0`` explicitly disables :ref:`Python UTF-8 Mode <utf8-mode>`
|
``-X utf8=0`` explicitly disables :ref:`Python UTF-8 Mode <utf8-mode>`
|
||||||
(even when it would otherwise activate automatically).
|
(even when it would otherwise activate automatically).
|
||||||
|
See also :envvar:`PYTHONUTF8`.
|
||||||
* ``-X pycache_prefix=PATH`` enables writing ``.pyc`` files to a parallel
|
* ``-X pycache_prefix=PATH`` enables writing ``.pyc`` files to a parallel
|
||||||
tree rooted at the given directory instead of to the code tree. See also
|
tree rooted at the given directory instead of to the code tree. See also
|
||||||
:envvar:`PYTHONPYCACHEPREFIX`.
|
:envvar:`PYTHONPYCACHEPREFIX`.
|
||||||
|
@ -847,7 +850,9 @@ conflict.
|
||||||
Python memory allocations using the :mod:`tracemalloc` module. The value of
|
Python memory allocations using the :mod:`tracemalloc` module. The value of
|
||||||
the variable is the maximum number of frames stored in a traceback of a
|
the variable is the maximum number of frames stored in a traceback of a
|
||||||
trace. For example, ``PYTHONTRACEMALLOC=1`` stores only the most recent
|
trace. For example, ``PYTHONTRACEMALLOC=1`` stores only the most recent
|
||||||
frame. See the :func:`tracemalloc.start` for more information.
|
frame.
|
||||||
|
See the :func:`tracemalloc.start` function for more information.
|
||||||
|
This is equivalent to setting the :option:`-X` ``tracemalloc`` option.
|
||||||
|
|
||||||
.. versionadded:: 3.4
|
.. versionadded:: 3.4
|
||||||
|
|
||||||
|
@ -855,8 +860,8 @@ conflict.
|
||||||
.. envvar:: PYTHONPROFILEIMPORTTIME
|
.. envvar:: PYTHONPROFILEIMPORTTIME
|
||||||
|
|
||||||
If this environment variable is set to a non-empty string, Python will
|
If this environment variable is set to a non-empty string, Python will
|
||||||
show how long each import takes. This is exactly equivalent to setting
|
show how long each import takes.
|
||||||
``-X importtime`` on the command line.
|
This is equivalent to setting the :option:`-X` ``importtime`` option.
|
||||||
|
|
||||||
.. versionadded:: 3.7
|
.. versionadded:: 3.7
|
||||||
|
|
||||||
|
@ -998,6 +1003,7 @@ conflict.
|
||||||
If this environment variable is set to a non-empty string, enable
|
If this environment variable is set to a non-empty string, enable
|
||||||
:ref:`Python Development Mode <devmode>`, introducing additional runtime
|
:ref:`Python Development Mode <devmode>`, introducing additional runtime
|
||||||
checks that are too expensive to be enabled by default.
|
checks that are too expensive to be enabled by default.
|
||||||
|
This is equivalent to setting the :option:`-X` ``dev`` option.
|
||||||
|
|
||||||
.. versionadded:: 3.7
|
.. versionadded:: 3.7
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue