Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Installed listings can still select a stable release for 3-dev, while execution can choose an x64 prerelease despite an available preferred ARM64 prerelease.
2 open issues
What changed in this PR
This PR addresses #428 by making -dev tags and ranges signal prerelease preference during runtime selection.
Changes:
- Add prerelease-preference detection for tags and ranges, excluding negated constraints.
- Apply that preference to installation lookup, execution, and online single-result listings.
- Add tests for suffix casing, platform suffixes, and range operators.
| File | Description |
|---|---|
| tests/test_tagutils.py | Tests prerelease preferences for tags and ranges. |
| src/manage/tagutils.py | Adds suffix checking and prerelease-preference properties. |
| src/manage/list_command.py | Honors prerelease preference in online --one listings. |
| src/manage/installs.py | Prefers matching installed prereleases for execution. |
| src/manage/indexutils.py | Infers installation prerelease preference from the requested tag or range. |
Review effort: Balanced
Comment on lines
+360
to
+367
| if tag and tag.prefers_prerelease: | ||
| for i, t in best: | ||
| try: | ||
| if Version(i["sort-version"]).is_prerelease: | ||
| return _patch_install_to_run(i, t) | ||
| except ValueError as ex: | ||
| LOGGER.debug("Failed to parse %s to check for prerelease", | ||
| i["sort-version"]) |
Comment on lines
+359
to
361
| if any(t.prefers_prerelease for t in tags): | ||
| # First result will be the latest prerelease (or release) | ||
| installs = best[:1] or installs |
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.

Fixes #428