-
-
Notifications
You must be signed in to change notification settings - Fork 32k
PyConfig.stdlib_dir
does not affect sys._stdlib_dir
#106718
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
Comments
Looking at It looks like the I won't be able to get to this in time for 3.12.0rc1, but the change ought to be entirely in Python starting from |
I'll try to send a PR for this. I'm not familiar with the code so I may need additional pointers later. |
…stdlib_dir when calculating paths (GH-108730)
…g for stdlib_dir when calculating paths (pythonGH-108730)
…g for stdlib_dir when calculating paths (pythonGH-108730)
…g for stdlib_dir when calculating paths (pythonGH-108730)
Uh oh!
There was an error while loading. Please reload this page.
In Python 3.11, PyConfig gained a
stdlib_dir
attribute which is, as far as I can tell, supposed to overridesys._stdlib_dir
(which is used by importlib). No matter what I set it to or what else I set, however, it seems to be ignored. For example:It doesn't seem to matter whether
PyConfig.stdlib_dir
is set to an existing directory either (although for my use-case, it must be a non-existant one; we're getting the stdlib from embedded data, and the incorrect setting ofsys._stdlib_dir
means importlib'sFrozenImporter
sets the wrong__file__
attribute on frozen/deepfrozen modules, likeos
.)Linked PRs
The text was updated successfully, but these errors were encountered: