]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45020: Add -X frozen_modules=[on|off] to explicitly control use of frozen modules...
authorEric Snow <ericsnowcurrently@gmail.com>
Tue, 14 Sep 2021 23:31:45 +0000 (17:31 -0600)
committerGitHub <noreply@github.com>
Tue, 14 Sep 2021 23:31:45 +0000 (17:31 -0600)
commita65c86889e208dddb26a7ebe7840c24edbcca775
treeec55222c3ac183806fc06f0d60514ab21e6dc560
parent1aaa85949717e4ab2ed700e58762f0a3ce049a37
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
16 files changed:
Doc/using/cmdline.rst
Include/cpython/initconfig.h
Include/internal/pycore_initconfig.h
Include/internal/pycore_interp.h
Lib/ctypes/test/test_values.py
Lib/test/support/import_helper.py
Lib/test/support/os_helper.py
Lib/test/test_embed.py
Lib/test/test_frozen.py
Lib/test/test_importlib/frozen/test_finder.py
Lib/test/test_importlib/frozen/test_loader.py
Misc/NEWS.d/next/Core and Builtins/2021-08-31-17-44-51.bpo-45020.ZPI_3L.rst [new file with mode: 0644]
Python/clinic/import.c.h
Python/import.c
Python/initconfig.c
Python/pylifecycle.c