-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Discover uv-managed Python installations #2902
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to fix the CI first though, can you open a parallel PR for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong button 😆
Saw you started #2904. Want to take a stab in a different PR? |
Yeah I started but solution turned out something complicated... At some point might get back to it. |
What's the problem with it? |
Seems the way the free threaded Python interpeter was provided broke, and tox can no longer discover it. |
See https://github.com/pypa/virtualenv/actions/runs/16314042782/job/46075567108. |
Might not be needed anymore: https://github.com/astral-sh/uv/releases/tag/0.8.0. |
Can still be helpful as users might not add that folder to their |
I wrote an issue in the tox repo: tox-dev/tox#3580
In my case, the uv Python isn't on the PATH at all, yet virtualenv finds it instead of the Python 3.13 that is on the path. Should I open an issue in this repo? |
I don't understand the logic of this. If I wanted to use uv interpreters, I would put them in the PATH. |
That's not generally true. On Windows we support PEP-514 even without those being on PATH.
If uv takes priority over PATH I'd consider that a bug, and PR/issue welcome. |
That's exactly the behavior as explained in the description of this PR. |
Closes #2901.
This PR updates the interpreter discovery logic to look for uv-managed Python installations.
They currently take priority over Python interpreters in
PATH
but I'm not 100% sure that makes sense so let me know what you think!An alternative to this PR that I found after starting work for this PR is implementing a discovery plugin. I see
pyenv
discovery has not been implemented as a builtin discovery option, so let me know if there are good reasons to also keep uv-managed Pythons outside of virtualenv's scope.Thanks for contributing, make sure you address all the checklists (for details on how see development documentation)
tox -e fix
)docs/changelog
folder