uv/crates/uv-python
Zsolt Dollenstein 46bf420eae
Allow upgrading prerelease versions of the same minor Python version (#15959)
Turns out if the minor versions matched we returned false from
`is_upgrade_of` instead of continuing to compare prerelease versions.

Closes #15955.

Note: test cases were initially generated by Claude - I tried making
them shorter.

## Test plan

```
❯ cargo run -- -v python upgrade 3.14
[...]
DEBUG Inspecting existing executable at `/Users/zsol/.local/bin/python3.14`
DEBUG Replacing existing executable for `cpython-3.14.0rc2-macos-aarch64-none` at `/Users/zsol/.local/bin/python3.14` with executable for `cpython-3.14.0rc3-macos-aarch64-none` since it is an upgrade
DEBUG Updated executable at `/Users/zsol/.local/bin/python3.14` to cpython-3.14.0rc3-macos-aarch64-none
Installed Python 3.14.0rc3 in 5.04s
 + cpython-3.14.0rc3-macos-aarch64-none (python3.14)
[...]
❯ uvx python3.14 -V
Python 3.14.0rc3
```
2025-09-22 16:59:48 +00:00
..
python Allow selection of debug build interpreters (#11520) 2025-09-12 13:32:22 +00:00
src Allow upgrading prerelease versions of the same minor Python version (#15959) 2025-09-22 16:59:48 +00:00
.gitignore minify and filter embed managed pythons json on compile time (#12967) 2025-04-30 15:51:03 -04:00
build.rs Allow selection of debug build interpreters (#11520) 2025-09-12 13:32:22 +00:00
Cargo.toml Use the windows crate facade consistently (#15737) 2025-09-09 15:07:14 +00:00
download-metadata.json Sync latest Python releases (#15940) 2025-09-19 18:13:33 +00:00
fetch-download-metadata.py Allow selection of debug build interpreters (#11520) 2025-09-12 13:32:22 +00:00