Skip to content

Check prerelease interpreters without mutating metadata - #920

Open
notatallshaw wants to merge 1 commit into
mesonbuild:mainfrom
notatallshaw:fix/prerelease-interpreter-check-20261019
Open

notatallshaw wants to merge 1 commit into
mesonbuild:mainfrom
notatallshaw:fix/prerelease-interpreter-check-20261019

Conversation

@notatallshaw

@notatallshaw notatallshaw commented Oct 19, 2026 •

Copy link
Copy Markdown

I plan to deprecate mutability of packaging's core objects to improve performance and hashability. This PR removes mutation of the project's requires-python specifier ahead of that change.

A new __replace__ API will cover callers that need a modified copy in future versions of packaging. The interpreter check doesn't need a copy: it passes prereleases=True to contains(), keeping preview Python versions eligible without changing project metadata.

This branch has not been deployed

No deployments
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 this pull request may close these issues.

1 participant