Repository navigation
🐛 fix(create): keep distutils paths inside environments - #3696
Merged
gaborbernat merged 4 commits intoNov 20, 2026
Merged
Conversation
gaborbernat
force-pushed
the
fix/filter-distutils-after-decode-error
branch
from
November 20, 2026 15:13
c09bb0b to
d68d861
Compare
Parsing can leave unsafe options behind after a decoding error. Distutils also accepts destinations on install subcommands. Filter both forms before an install uses the partial configuration.
gaborbernat
force-pushed
the
fix/filter-distutils-after-decode-error
branch
from
November 20, 2026 15:31
d68d861 to
4532005
Compare
gaborbernat
marked this pull request as ready for review
November 20, 2026 16:49
gaborbernat
marked this pull request as draft
November 20, 2026 20:26
gaborbernat
marked this pull request as ready for review
November 20, 2026 20:47
gaborbernat
marked this pull request as draft
November 20, 2026 20:56
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
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Python 3.9 environments could install packages outside the environment when distutils configuration set an install directory. A later config decode error left earlier options in place, and
install_libcould also override the destination. The hook now filters those options after a successful parse or a decoding error. Fixes #3602. Fixes #3606.The hook removes config-file destinations for the install command and its subcommands, including
install_egg_info, so package metadata stays with the installed package. It keeps an explicit environment prefix so distutils resolves the remaining defaults inside the environment. A decoding error still aborts parsing.A Python 3.9 environment registers the distutils import hook. On newer interpreters it stays inactive even if they load a Python 3.9 environment's
.pthfile. Raising the minimum Python version to 3.10 makes Ruff flag the registration for removal.Reported by oss-scanner: ANT-2026-7PG08GIP, ANT-2026-YQ6XOMQR.