summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2021-09-14 23:31:45 (GMT)
committerGitHub <noreply@github.com>2021-09-14 23:31:45 (GMT)
commita65c86889e208dddb26a7ebe7840c24edbcca775 (patch)
treeec55222c3ac183806fc06f0d60514ab21e6dc560 /Doc
parent1aaa85949717e4ab2ed700e58762f0a3ce049a37 (diff)
downloadcpython-a65c86889e208dddb26a7ebe7840c24edbcca775.zip
cpython-a65c86889e208dddb26a7ebe7840c24edbcca775.tar.gz
cpython-a65c86889e208dddb26a7ebe7840c24edbcca775.tar.bz2
bpo-45020: Add -X frozen_modules=[on|off] to explicitly control use of frozen modules. (gh-28320)
Currently we freeze several modules into the runtime. For each of these modules it is essential to bootstrapping the runtime that they be frozen. Any other stdlib module that we later freeze into the runtime is not essential. We can just as well import from the .py file. This PR lets users explicitly choose which should be used, with the new "-X frozen_modules=[on|off]" CLI flag. The default is "off" for now. https://bugs.python.org/issue45020
Diffstat (limited to 'Doc')
-rw-r--r--Doc/using/cmdline.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
index 7ebc34f..2398ab0 100644
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -480,6 +480,12 @@ Miscellaneous options
objects and pyc files are desired as well as supressing the extra visual
location indicators when the interpreter displays tracebacks. See also
:envvar:`PYTHONNODEBUGRANGES`.
+ * ``-X frozen_modules`` determines whether or not frozen modules are
+ ignored by the import machinery. A value of "on" means they get
+ imported and "off" means they are ignored. The default is "on"
+ for non-debug builds (the normal case) and "off" for debug builds.
+ Note that the "importlib_bootstrap" and "importlib_bootstrap_external"
+ frozen modules are always used, even if this flag is set to "off".
It also allows passing arbitrary values and retrieving them through the
:data:`sys._xoptions` dictionary.
@@ -518,6 +524,9 @@ Miscellaneous options
.. versionadded:: 3.11
The ``-X no_debug_ranges`` option.
+ .. versionadded:: 3.11
+ The ``-X frozen_modules`` option.
+
Options you shouldn't use
~~~~~~~~~~~~~~~~~~~~~~~~~