Skip to content

🐛 fix(create): filter paths after config errors - #3612

Merged
gaborbernat merged 3 commits into
pypa:mainfrom
gaborbernat:fix/filter-distutils-after-decode-error
Nov 20, 2026
Merged

gaborbernat merged 3 commits into
pypa:mainfrom
gaborbernat:fix/filter-distutils-after-decode-error

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

The Python 3.9 distutils hook filtered install paths only when configuration parsing returned normally. If decoding a later config file failed, options from an earlier file remained in the distribution object. The hook now filters those options on the error path too. Fixes #3602.

Partial config parsing

The filter now runs in finally, after distutils has either completed or raised. The original parsing error still reaches the caller; the filter removes install path overrides left by earlier files.

Behavior changes

A decode error still fails the install. A caller that catches that error no longer sees the unfiltered install destinations in the distribution object.

Report ANT-2026-YQ6XOMQR.

@gaborbernat
gaborbernat merged commit abaef52 into pypa:main Nov 20, 2026
81 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python 3.9 distutils filter skips a decoding error

1 participant