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 at https://github.com/astral-sh/uv/blob/060be9cef197d83e5546fb1be10e8e8373a1cfc6/crates/uv-python/src/discovery.rs#L2146-L2149 https://github.com/astral-sh/uv/pull/13330/commits/060be9cef197d83e5546fb1be10e8e8373a1cfc6 shows the snapshot change.
This commit is contained in:
@@ -1246,6 +1246,16 @@ fn python_install_314() {
|
||||
----- stderr -----
|
||||
");
|
||||
|
||||
// This also applies to `>=` requests, even though pre-releases aren't technically in the range
|
||||
uv_snapshot!(context.filters(), context.python_find().arg(">=3.14"), @r"
|
||||
success: true
|
||||
exit_code: 0
|
||||
----- stdout -----
|
||||
[TEMP_DIR]/managed/cpython-3.14.0a6-[PLATFORM]/[INSTALL-BIN]/python
|
||||
|
||||
----- stderr -----
|
||||
");
|
||||
|
||||
uv_snapshot!(context.filters(), context.python_find().arg("3"), @r"
|
||||
success: true
|
||||
exit_code: 0
|
||||
|
||||
Reference in New Issue
Block a user