make --find-interpreter skip prerelease Python unless --allow-prereleases - #3276
Open
tientnc wants to merge 2 commits into
Open
make --find-interpreter skip prerelease Python unless --allow-prereleases#3276tientnc wants to merge 2 commits into
tientnc wants to merge 2 commits into
Conversation
Author
|
The one red check, This happened while extracting a tool archive on the ARM Windows runner, so it looks like a transient runner issue rather than anything in this change. The same |
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.
What does this PR do?
--find-interpreterskip prerelease (alpha/beta/rc) Python interpreters, by default, with a--allow-prereleasesflag to opt back insys.version_info.releaselevel; each discovered interpreter is tagged as prerelease or not, and the resolver drops prereleases (printing a notice for each) unless--allow-prereleasesis passed-iare never filtered, since naming one is already an opt-inNote: this changes the default behavior of
--find-interpreter: prereleases are now skipped unless opted in (which is the behavior asked for in the issue).Why was this PR needed?
--find-interpreterbuilds a wheel for every discovered interpreter with no distinction between a final release and a prerelease, which risks accidentally publishing prerelease wheels to PyPI (e.g. in CI). Root cause: the probe script (get_interpreter_metadata.py) never collectedreleaselevel, soInterpreterMetadataMessagehad no field for it and nothing in the Rust discovery path could act on it. Therefore, the fix starts at collection and threads the value through to the resolver, where the skip decision has access to the user's flags.What are the relevant issue numbers?
Closes #1975
Does this PR meet the acceptance criteria?
test_interpreter_releaselevel_marks_prerelease)python_interpreter+build_optionssuites;cargo fmt --check+clippyclean)--find-interpreternow skips prereleases, as requested in the issue)