summaryrefslogtreecommitdiff
path: root/Doc/using
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-11-30 11:40:24 +0100
committerGitHub <noreply@github.com>2017-11-30 11:40:24 +0100
commit5e3806f8cfd84722fc55d4299dc018ad9b0f8401 (patch)
tree436f0a963001f590a1193dba5c84627ba59513c2 /Doc/using
parent706e10b186992e086e661a62d2c8ec9588525b31 (diff)
downloadcpython-git-5e3806f8cfd84722fc55d4299dc018ad9b0f8401.tar.gz
bpo-32101: Add PYTHONDEVMODE environment variable (#4624)
* bpo-32101: Add sys.flags.dev_mode flag Rename also the "Developer mode" to the "Development mode". * bpo-32101: Add PYTHONDEVMODE environment variable Mention it in the development chapiter.
Diffstat (limited to 'Doc/using')
-rw-r--r--Doc/using/cmdline.rst12
1 files changed, 11 insertions, 1 deletions
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
index e6189fd812..d110ae3baf 100644
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -411,7 +411,7 @@ Miscellaneous options
nested imports). Note that its output may be broken in multi-threaded
application. Typical usage is ``python3 -X importtime -c 'import
asyncio'``. See also :envvar:`PYTHONPROFILEIMPORTTIME`.
- * ``-X dev``: enable CPython's "developer mode", introducing additional
+ * ``-X dev``: enable CPython's "development mode", introducing additional
runtime checks which 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. Effect of the developer mode:
@@ -426,6 +426,8 @@ Miscellaneous options
* Enable the :mod:`faulthandler` module to dump the Python traceback
on a crash.
* Enable :ref:`asyncio debug mode <asyncio-debug-mode>`.
+ * Set the :attr:`~sys.flags.dev_mode` attribute of :attr:`sys.flags` to
+ ``True``
It also allows passing arbitrary values and retrieving them through the
:data:`sys._xoptions` dictionary.
@@ -796,6 +798,14 @@ conflict.
.. versionadded:: 3.7
See :pep:`538` for more details.
+
+.. envvar:: PYTHONDEVMODE
+
+ If this environment variable is set to a non-empty string, enable the
+ CPython "development mode". See the :option:`-X` ``dev`` option.
+
+ .. versionadded:: 3.7
+
Debug-mode variables
~~~~~~~~~~~~~~~~~~~~