-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Python preference #70
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
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.
tox-uv does not interact with uv python
, only with uv venv
. Doesn't the later only uses system pythons?
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.
tox-uv does not interact with uv python
, only with uv venv
. Doesn't the later only uses system pythons?
using I proposed this PR as it allows me to stop worrying about my python versions installed on my system and let tox-uv manage this through uv python. By default no flag is passed to |
Can you link to upstream docs of this? |
https://docs.astral.sh/uv/python-versions/#adjusting-python-version-preferences Should be in the README.md too. |
for more information, see https://pre-commit.ci
The CI is broken. |
Blocking now with the typing error. Optional or Union[Type, None] are not working. Investigating. |
At this point the CI pass locally |
Seem it is not. Note you can setup https://github.com/RomainBrault/tox-uv/actions to not need to wait for my approval. |
Here we go. I had to remove some type information to make it compatible with Python <3.10. Thank you for your patience. |
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.
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.
I guess this is why I reported #72 I thought tox-uv didn't "do this" because it was not advertised, and some open issues suggested otherwise. This is a feature that has just turned up, because Oh and it's a preview feature in uv so in that sense I guess it makes sense to not make any guarantees about it. |
This PR enables the usage of the flag --python-preference to better control which Python interpreter is used.
See https://docs.astral.sh/uv/python-versions/#adjusting-python-version-preferences
It does so by exposing a
uv_python_preference
configuration field.Note: this can be used to download missing Python interpreter. Use for example