-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
bpo-45396: Always import custom frozen modules. #28776
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
bpo-45396: Always import custom frozen modules. #28776
Conversation
@brettcannon, this is the result of #28633 (comment). |
Can we have a bit more discussion about this before this is merged? Do you have an example of a real-word app that sets |
Setting Regardless, the point is probably moot. If gh-28778 is merged (which I expect) then this PR is unnecessary. The only reason I hadn't closed this one is on the chance that the other PR ends up closed. In the meantime I'm closing this one. |
If a Python build has a custom array set to
PyImport_FrozenModules
(see Python/frozen.c) then that array is used instead of the default one. In that case the whole point is that the custom frozen modules should be used. So in this change we ignore thePyConfig.use_frozen_modules
setting if there are custom frozen modules. We also change the "-X frozen_modules" CLI option to "-X frozen_stdlib" to reflect the more specific context.https://bugs.python.org/issue45396