mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
Fix discovery of pre-release managed Python versions in range requests (#13330)
We have test coverage for this elsewhere, but managed Python versions are a distinct case because we know the _full_ version before querying the interpreter (whereas, when we find them on the `PATH`, we usually only know `X.y` from the file name). This pre-filter logic now matches our subsequent logic at060be9cef1/crates/uv-python/src/discovery.rs (L2146-L2149)
060be9cef1
shows the snapshot change.
This commit is contained in:
parent
1eaa432e37
commit
ddd6f3debe
2 changed files with 11 additions and 1 deletions
|
@ -2177,7 +2177,7 @@ impl VersionRequest {
|
|||
(version.major(), version.minor(), version.patch())
|
||||
== (*major, *minor, Some(*patch))
|
||||
}
|
||||
Self::Range(specifiers, _) => specifiers.contains(&version.version),
|
||||
Self::Range(specifiers, _) => specifiers.contains(&version.version.only_release()),
|
||||
Self::MajorMinorPrerelease(major, minor, prerelease, _) => {
|
||||
(version.major(), version.minor(), version.pre())
|
||||
== (*major, *minor, Some(*prerelease))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue