On Tue, Sep 28, 2021 at 12:52 AM Eric Snow <ericsnowcurrently@gmail.com> wrote:
On Mon, Sep 27, 2021 at 3:31 PM Victor Stinner <vstinner@python.org> wrote:
Which stdlib modules are currently frozen? If I really want to hack site.py or os.py for whatever reason, I just have to use "python3 -X frozen_modules=off"?
The single-source-of-truth is Tools/scripts/freeze_modules.py. After running "make regen-frozen" you'll find a cleaner list in Python/frozen_modules/MANIFEST. You can also look at the generated code in Makefile.pre.in or Python/frozen.c. Finally, you can run "./python -X frozen_modules=on -c 'import _imp; print(_imp._frozen_module_names())'"
Ok, so compared to Python 3.10, the following 13 stdlib modules can now be frozen: * _collections_abc * _sitebuiltins * abc * codecs * genericpath * io * ntpath * os * os.path * posixpath * site * stat * zipimport (I tested on Linux. I guess that the list is the same on other operating systems.) Victor -- Night gathers, and now my watch begins. It shall not end until my death.