GeezerVison is showing github.com — Properly handle -dev suffix on tags and ranges. by zooba · Pull Request #436 · python/pymanager
Conversation
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 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
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved runtime-selection regressions can produce missing or multiple results, violate managed-only and version filters, and raise uncaught exceptions.
7 open issues
2 resolved since last review
Review effort: Balanced
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
|
best_ver = None
|
|
|
for t in tags:
|
|
|
try:
|
|
|
install = cmd.get_install_to_run(t)
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Active selection regressions allow --online --one to return multiple runtimes and cause --one to omit installed defaults or valid prerelease matches.
3 open issues
2 previously missed issues
In code that hasn't changed since last review
Preserve a runtime when --one is used without filters
src/manage/list_command.py:388
Without any filters, tags is empty, so the new loop never adds a candidate and line 404 replaces the installed runtimes with an empty list. Consequently, py list --one -f=exe produces no executable even when a default runtime is installed. Preserve the marked default (or first available runtime) when there are no filters, and use the per-tag selection only for explicit filters.
Use listing aliases when selecting filtered prerelease runtimes
src/manage/list_command.py:400
This second filtering pass requires a matching run-for alias, although listing uses install-for aliases. Prerelease records generated by scripts/generate-nuget-index.py include 3-dev-64 in install-for but not in run-for, so py list --one 3-dev discards these valid listing matches and can print nothing. Rank candidates using the listing match rules rather than requiring a runnable alias for the filter.
4 resolved since last review
Review effort: Balanced
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|