bpo-45020: Identify which frozen modules are actually aliases. #28655
Conversation
8a954d9
to
38b3893
If you want to schedule another build, you need to add the " |
38b3893
to
071ab26
48ee937
to
ccadbde
ccadbde
to
1e40678
1e40678
to
7d23290
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In the list of generated frozen modules at the top of
Tools/scripts/freeze_modules.py
, you will find that some of the modules have a different name than the module (or .py file) that is actually frozen. Let's call each case an "alias". Aliases do not come into play until we get to the (generated) list of modules inPython/frozen.c
. (The tool for freezing modules,Programs/_freeze_module
, is only concerned with the source file, not the module it will be used for.)Knowledge of which frozen modules are aliases (and the identity of the original module) normally isn't important. However, this information is valuable when we go to set
__file__
on frozen stdlib modules. This change updatesTools/scripts/freeze_modules.py
to map aliases to the original module name (orNone
if not a stdlib module) inPython/frozen.c
. We also add a helper function inPython/import.c
to look up a frozen module's alias and add the result of that function to the frozen info returned fromfind_frozen()
.https://bugs.python.org/issue45020
The text was updated successfully, but these errors were encountered: