Repository navigation
bpo-45020: Freeze the modules imported during startup. #28107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
ericsnowcurrently
wants to merge
61
commits into
python:main
from
ericsnowcurrently:frozen-startup-modules
Closed
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
a8bd3fc
Fix freeze_module() in freeze_modules.py.
ericsnowcurrently 6555ae4
Add FrozenSource and FrozenModule to freeze_modules.py.
ericsnowcurrently 3a63f92
Leave all non-required frozen modules uncommitted.
ericsnowcurrently 0587328
Leave *all* frozen modules uncommitted.
ericsnowcurrently 9881456
Generate the list of frozen modules used by test_ctypes.
ericsnowcurrently 3df3e23
Freeze the stdlib modules loaded during startup.
ericsnowcurrently bfd733c
Add the -X frozen_modules CLI option and PyConfig.use_frozen_modules.
ericsnowcurrently ca952fc
Ignore frozen modules depending on "-X frozen_modules".
ericsnowcurrently b4ca34c
Explicitly control PyConfig.use_frozen_modules during tests.
ericsnowcurrently ef5f3f7
Remember the stdlib dir during startup (adding PyConfig.stdlib_dir).
ericsnowcurrently 4b630b8
Add _Py_GetMainConfig().
ericsnowcurrently dd1a498
Let _Py_GetStdlibDir() fall back to a config.
ericsnowcurrently af07489
Add _PyConfig_InitImportConfig().
ericsnowcurrently 4e4baeb
Identify whether or not the executable is running installed (adding _…
ericsnowcurrently 344a5ec
Default to "off" if in development.
ericsnowcurrently 8710d80
Remember if built with --enable-optimizations (adding the _Py_OPT mac…
ericsnowcurrently 77cf801
Default to "on" for PGO builds.
ericsnowcurrently 2702554
Add a NEWS entry.
ericsnowcurrently becae8f
Fix test_embed for PyConfig.stdlib_dir.
ericsnowcurrently 7f0c8eb
In _Py_GetStdlibDir(), treat "" as though it were NULL.
ericsnowcurrently d07f63c
Fix test_embed for "Default to "off" if in development.".
ericsnowcurrently 4787a70
Treat __main__ as an essential frozen module.
ericsnowcurrently a75b808
Fix test_cmd_line_script for "Default to "off" if in development.".
ericsnowcurrently 2050793
Ignore frozen submodules in generate_stdlib_module_names.py.
ericsnowcurrently e16771d
Add a comment to the frozen modules manifest file.
ericsnowcurrently e5b4da7
_Py_IsInstalled -> _Py_IsDevelopmentEnv.
ericsnowcurrently 8b54908
Look up $_PYTHONTESTFROZENMODULES using getenv() instead of in os.env…
ericsnowcurrently a82b06a
Remove zipimport.h from the repo.
ericsnowcurrently ead34a1
Add zipimport to the list of essential frozen modules.
ericsnowcurrently 58ccaff
Show how the frozen manifest changed.
ericsnowcurrently 6d068b1
Stop using the frozen helper in test_cmd_line_script.
ericsnowcurrently 1021f53
Go back to keeping frozen modules in the repo.
ericsnowcurrently c01b532
Also stop tracking the frozen manifest.
ericsnowcurrently 0c1061d
Mark the frozen manifest as a generated file.
ericsnowcurrently fa23009
Drop a superfluous prefix on makefile rule dependencies.
ericsnowcurrently 03b9571
Do not generate test code.
ericsnowcurrently b3a7aaf
Drop unused code from freeze_modules.py.
ericsnowcurrently 6a896f1
Flip around the arg to the "frozen_modules" test helper.
ericsnowcurrently 211febe
Disable frozen modules if $_PYTHONTESTFROZENMODULES is 0.
ericsnowcurrently fbaf15c
Add the "usefrozen" arg to CleanImport.__init__().
ericsnowcurrently 6243c54
Undo the changes to tests that were using the os module.
ericsnowcurrently da978a2
Undo the changes to tests that were using the os module.
ericsnowcurrently 46d488f
Ignore decode errors in find_frozen().
ericsnowcurrently 93fc5c0
Fix test_ctypes.
ericsnowcurrently dd36ba5
Allow for a .exe suffix on the executable.
ericsnowcurrently 45e7509
Do not clear the frozen .h files with "make distclean", now that they…
ericsnowcurrently a7d607f
Update the frozen modules using a debug build.
ericsnowcurrently 75556af
Always flush the printed "title" when freezing modules.
ericsnowcurrently 37b79f1
Add the frozen manifest back into the repo.
ericsnowcurrently d93c1e7
Drop the PGO check (for now).
ericsnowcurrently 25b60de
Drop _Py_IsDevelopmentEnv().
ericsnowcurrently 358ab69
Drop -_Py_GetStdlibDir() and PyConfig.stdlib_dir.
ericsnowcurrently 1fc1198
Default to "-X frozen_modules=off" if built with --with-debug.
ericsnowcurrently 37eb1f8
Fix test_embed.
ericsnowcurrently 2e05771
Clean up the marshal code.
ericsnowcurrently 82b4f85
Add WFILE.refs.nonref.
ericsnowcurrently 097fc40
Add _PyMarshal_WriteForFreezing().
ericsnowcurrently a333fa3
Fix the ASAN job.
ericsnowcurrently 8abf4a0
Fix the Windows builds.
ericsnowcurrently 1005321
Use a simpler change for test_idle.
ericsnowcurrently 7d62747
Fix test_4_daemon_threads.
ericsnowcurrently File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add the "usefrozen" arg to CleanImport.__init__().
- Loading branch information
commit fbaf15c889dde8ecd202737e7b35ca77b00254dc
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the class docstring to mention that it also disabled frozen modules unless usefrozen=True is passed?