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

Omit variant when detecting compatible Python installs #10722

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

charliermarsh
Copy link
Member

Summary

Closes #10586.

@charliermarsh
Copy link
Member Author

I don't have a great way to test this.

@charliermarsh charliermarsh added the bug Something isn't working label Jan 17, 2025
@charliermarsh charliermarsh requested a review from zanieb January 17, 2025 19:30
@zanieb
Copy link
Member

zanieb commented Jan 17, 2025

I think I solved this in #9788 — one sec

@zanieb
Copy link
Member

zanieb commented Jan 17, 2025

Funny, similar d51e5d7 — it's a bit more nuanced though

@charliermarsh
Copy link
Member Author

Want me to port that over here? Close this entirely? Merge as-is? Up to you!

@zanieb
Copy link
Member

zanieb commented Jan 17, 2025

I won't have time to look closer today, I think my change might require the other changes in the PR, i.e., we only allow an older version from a newer architecture — not the other way around. So if we can't detect a newer architecture it doesn't solve anything.

@zanieb
Copy link
Member

zanieb commented Jan 17, 2025

Quick test looks good, I'm fine with the incremental improvement here

❯ uv python install "cpython-3.10.16-linux-x86_64_v2-gnu"
Installed Python 3.10.16 in 2.20s
 + cpython-3.10.16-linux-x86_64_v2-gnu
❯ uv python list
cpython-3.14.0a4+freethreaded-linux-x86_64-gnu    <download available>
cpython-3.14.0a4-linux-x86_64-gnu                 <download available>
cpython-3.13.1+freethreaded-linux-x86_64-gnu      <download available>
cpython-3.13.1-linux-x86_64-gnu                   /usr/bin/python3.13
cpython-3.13.1-linux-x86_64-gnu                   /usr/bin/python3 -> python3.13
cpython-3.13.1-linux-x86_64-gnu                   /usr/bin/python -> python3
cpython-3.13.1-linux-x86_64-gnu                   /bin/python3.13
cpython-3.13.1-linux-x86_64-gnu                   /bin/python3 -> python3.13
cpython-3.13.1-linux-x86_64-gnu                   /bin/python -> python3
cpython-3.13.1-linux-x86_64-gnu                   <download available>
cpython-3.12.8-linux-x86_64-gnu                   <download available>
cpython-3.11.11-linux-x86_64-gnu                  <download available>
cpython-3.10.16-linux-x86_64-gnu                  <download available>
cpython-3.9.21-linux-x86_64-gnu                   <download available>
cpython-3.8.20-linux-x86_64-gnu                   <download available>
cpython-3.7.9-linux-x86_64-gnu                    <download available>
pypy-3.10.14-linux-x86_64-gnu                     <download available>
pypy-3.9.19-linux-x86_64-gnu                      <download available>
pypy-3.8.16-linux-x86_64-gnu                      <download available>
pypy-3.7.13-linux-x86_64-gnu                      <download available>
❯ ./target/debug/uv python list
cpython-3.14.0a4+freethreaded-linux-x86_64-gnu    <download available>
cpython-3.14.0a4-linux-x86_64-gnu                 <download available>
cpython-3.13.1+freethreaded-linux-x86_64-gnu      <download available>
cpython-3.13.1-linux-x86_64-gnu                   /usr/bin/python3.13
cpython-3.13.1-linux-x86_64-gnu                   /usr/bin/python3 -> python3.13
cpython-3.13.1-linux-x86_64-gnu                   /usr/bin/python -> python3
cpython-3.13.1-linux-x86_64-gnu                   /bin/python3.13
cpython-3.13.1-linux-x86_64-gnu                   /bin/python3 -> python3.13
cpython-3.13.1-linux-x86_64-gnu                   /bin/python -> python3
cpython-3.13.1-linux-x86_64-gnu                   <download available>
cpython-3.12.8-linux-x86_64-gnu                   <download available>
cpython-3.11.11-linux-x86_64-gnu                  <download available>
cpython-3.10.16-linux-x86_64-gnu                  /home/zb/.local/share/uv/python/cpython-3.10.16-linux-x86_64_v2-gnu/bin/python3.10
cpython-3.9.21-linux-x86_64-gnu                   <download available>
cpython-3.8.20-linux-x86_64-gnu                   <download available>
cpython-3.7.9-linux-x86_64-gnu                    <download available>
pypy-3.10.14-linux-x86_64-gnu                     <download available>
pypy-3.9.19-linux-x86_64-gnu                      <download available>
pypy-3.8.16-linux-x86_64-gnu                      <download available>
pypy-3.7.13-linux-x86_64-gnu                      <download available>
❯ uv run -p 3.10 python -c ""
cpython-3.10.16-linux-x86_64-gnu ------------------------------ 16.22 MiB/19.80 MiB                                          ^C
❯ ./target/debug/uv run -p 3.10 python -c ""

We shouldn't omit the variant in python list but that's separate

@zanieb
Copy link
Member

zanieb commented Jan 17, 2025

You might want to make sure the sorting is right too (as done in the other pr)

@zanieb
Copy link
Member

zanieb commented Jan 17, 2025

❯ ./target/debug/uv python install 3.10
Installed Python 3.10.16 in 2.81s
 + cpython-3.10.16-linux-x86_64-gnu
❯ ./target/debug/uv python install cpython-3.10.16-linux-x86_64_v2-gnu
Installed Python 3.10.16 in 2.93s
 + cpython-3.10.16-linux-x86_64_v2-gnu
❯ ./target/debug/uv python find 3.10
/home/zb/.local/share/uv/python/cpython-3.10.16-linux-x86_64_v2-gnu/bin/python3.10

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.

uv python list doesn't pick up non-base variants of python
2 participants