Skip to content
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

distutils submodules being loaded from the stdlib #2906

Closed
jaraco opened this issue Nov 26, 2021 · 2 comments · Fixed by #2907
Closed

distutils submodules being loaded from the stdlib #2906

jaraco opened this issue Nov 26, 2021 · 2 comments · Fixed by #2907

Comments

@jaraco
Copy link
Member

jaraco commented Nov 26, 2021

It seems the issue is that distutils.sysconfig is being loaded from the stdlib, even though the distutils hack has an explicit check that submodules are loaded from the locally-bundled copy.

Originally posted by @jaraco in pypa/distutils#16 (comment)

@jaraco
Copy link
Member Author

jaraco commented Nov 26, 2021

The issue only occurs when _distutils_system_mod is employed and that module itself imports modules from distutils because sys.modules won't yet have been updated to reflect the new base for distutils.

@jaraco
Copy link
Member Author

jaraco commented Nov 26, 2021

This issue primarily only affects the code path where ensure_local_distutils is called.

@jaraco jaraco changed the title distutils.sysconfig is being loaded from the stdlib distutils submodules being loaded from the stdlib Nov 26, 2021
jaraco added a commit that referenced this issue Nov 26, 2021
…ule. Avoids race conditions when _distutils_system_mod is employed and fixes #2906.
jaraco added a commit that referenced this issue Nov 26, 2021
…ule. Avoids race conditions when _distutils_system_mod is employed and fixes #2906.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant