-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support discovery of multiple python versions that are not on path #11308
Comments
I don't think we'll allow |
While |
I don't quite understand the use-case though. Like, why support things in addition to |
Is an escape hatch to force a given Python interpreter to be used, basically pushes that interpreter as the highest priority onto the discovery chain. Has a few advantages:
It follows the idea of explicit is better than implicit. It's primary use case is that imagine you have a script that requires Python In your script you specify A not complicated workaround for these use cases that |
We do support this already, via I'm pushing against accepting multiple Python paths and choosing between them.
Anyway, happy to consider — but I probably won't prioritize adding this without more feedback about why it's needed / use-cases / user requests. |
This doesn't work if you're script specifies the generic Another use case was of forcing thread free Python versions before we explicitely added support for them. Because before adding support the virtualenv discovery didn't know the difference between a threaded and non thread versions, so by settting that environment variable the user could force start/use this interpreter even if they are other compatible versions on the machine. @mneumei can add their own use case, but I present one above 👍 |
Our use case is that we don’t have an internet connection during our CI process, so we cannot rely on Python being managed by UV. Instead, we have a predefined set of Python versions available that we can use. |
Can you explain why you can't just set the PATH environment variable for your use case? Thank you. |
Summary
We have multiple python versions that we do not want to put on path. For a single venv, we run uv with --python and there is no issue, but when we want to run tox, we can not tell uv where to find those different python versions anymore (original flag: discover, with as many python versions as you want).
Ideally, you could e.g. give multiple --python options, and uv will select the most suitable (matching the python requirements, newest, first)
Linked Issue:
tox-dev/tox-uv#170 (comment)
Example
No response
The text was updated successfully, but these errors were encountered: