Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid selecting pre-releases for Python downloads without a version request #7278

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Sep 10, 2024

Following #7263 the 3.13.0rc2 releases are at the top of the download list but we should not select them unless 3.13 is actually requested.

Prior to this, uv python install would install 3.13.0rc2.

❯ cargo run -- python install --no-config
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/uv python install --no-config`
Searching for Python installations
Installed Python 3.12.6 in 1.33s
 + cpython-3.12.6-macos-aarch64-none
❯ cargo run -- python install --no-config 3.13
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/uv python install --no-config 3.13`
Searching for Python versions matching: Python 3.13
Installed Python 3.13.0rc2 in 1.18s
 + cpython-3.13.0rc2-macos-aarch64-none

@zanieb
Copy link
Member Author

zanieb commented Sep 10, 2024

This breaks uv python uninstall --all because it uses PythonDownloadRequest which needs to match here. Tweaking..

@zanieb
Copy link
Member Author

zanieb commented Sep 10, 2024

Okay all better

❯ cargo run -- python install --no-config
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.15s
     Running `target/debug/uv python install --no-config`
Searching for Python installations
Installed Python 3.12.6 in 1.20s
 + cpython-3.12.6-macos-aarch64-none
❯ cargo run -- python install --no-config 3.13
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/uv python install --no-config 3.13`
Searching for Python versions matching: Python 3.13
Installed Python 3.13.0rc2 in 1.25s
 + cpython-3.13.0rc2-macos-aarch64-none
❯ cargo run -- python uninstall --all
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/uv python uninstall --all`
Searching for Python installations
Uninstalled 2 versions in 82ms
 - cpython-3.12.6-macos-aarch64-none
 - cpython-3.13.0rc2-macos-aarch64-none
❯ cargo run -- python install --no-config 3.13
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.15s
     Running `target/debug/uv python install --no-config 3.13`
Searching for Python versions matching: Python 3.13
Installed Python 3.13.0rc2 in 1.24s
 + cpython-3.13.0rc2-macos-aarch64-none
❯ cargo run -- python install --no-config
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/uv python install --no-config`
Searching for Python installations
Found: cpython-3.13.0rc2-macos-aarch64-none
Python is already available. Use `uv python install <request>` to install a specific version.

@zanieb zanieb added the bug Something isn't working label Sep 10, 2024
@zanieb
Copy link
Member Author

zanieb commented Sep 10, 2024

Cancelled the #7274 release for this — will re-run after merge. Users aren't impacted by this bug since it's unreleased.

@zanieb zanieb enabled auto-merge (squash) September 10, 2024 22:19
@zanieb zanieb merged commit 77d278f into main Sep 10, 2024
57 checks passed
@zanieb zanieb deleted the zb/fix-313-install branch September 10, 2024 22:20
zanieb added a commit that referenced this pull request Sep 11, 2024
Follows #7278

Closes #7280

`uv python list` should show installed pre-release versions, even though
we don't select them by default (as defined by #7300 and
#7278)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants