-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Make uv dependency optional #82
Comments
also a @cached_property instead of @Property might be relevant. |
I am strongly against this. The sane behavior is to manage our version of UV; otherwise we have no idea whether what we get it compatible or not with the functionality we want to provide. |
Hello, It could be great to have an option for it. eg: manage_uv_version (bool) Use case: I use a tool version manager, like asdf. I have a Makefile which wrap my commands. make setup: asdf install uv version specified in '.tool-versions' file, then create a venv using system uv, source it and install tox + tox-uv I'm already ensuring compatibility of uv/tox-uv using asdf '.tool-versions' and i would like to avoid extra uv installation. Thanks. |
I will still say no, just because you can ensure compatibility that doesn't mean in general is true. |
You are absolutely right, that's why i propose to add it as an option. Default behavior still the same but allow users to disable it if needed/wanted.. |
Allowing opt-in behavior does trump the ensure compatibility argument, and makes the tool more flexible. |
If someones opts in and then fails to ensure compatbility and reports an error who will need to troubleshoot the issue? I am pretty sure the answer is me. |
Therefore, I will accept such PRs only if the contributor signs up to be maintainer too. |
What's the problem this feature will solve?
Currently uv is installed in tox's virtualenv.
If a user have its own uv in another virutalenv, it might cause confusion and more management (e.g. updates)
Describe the solution you'd like
Follow PyPA's build implementation:
https://github.com/pypa/build/blob/main/src/build/env.py
In tox uv we could modify in https://github.com/tox-dev/tox-uv/blob/main/src/tox_uv/_venv.py:
by
Remove the toplevel import and make the dependency optional in pyproject.toml
Additional context
To me the difficult part here is the test / coverage. I don't really know how to do.
It will also require to add some documentation, e.g.
By default tox-uv doesn't ship with uv. If you don´t have uv installed on your system, you can either
pip install tox-uv[uv
The drawback I'm seeing is that it might break systems where people didn't have uv install as a global tool and used only uv through tox-uv.
Alternative Solutions
Do not make the uv dependency optional but prioritize system uv over tox-uv's uv.
The text was updated successfully, but these errors were encountered: