-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Enable reading uv.toml
from venv
#9935
base: main
Are you sure you want to change the base?
Conversation
61ad5c2
to
f99f84f
Compare
f99f84f
to
1b64c2a
Compare
I think we're pretty hesitant to do this. When we recreate a virtual environment, we delete the entire directory. It doesn't seem like a good place for additional state, like settings. What does
mean? |
We have some "fixed" python production environments. E.g.:
And then we have e.g. python package That means that we want to give some set of hard constraints while installing
So for our use case it is better to have venv-specific configs, that can be generated (with script, Of course this doesn't maybe fit nicely to |
@zanieb Any updates on the decision? I'm looking forward to implementing uv in our workflows once this is approved. |
I don't think we want to do this, it's a core principle that virtual environments are ephemeral and disposable. Maybe we can find some other way for you to override settings per target environment. It sort of overlaps with #5903 |
Is the problem then that as Our current steps are:
Whereas with |
Resolves: #8107
Summary
Sometimes I would like to have per-venv
uv.toml
so that there could be e.g. multiple venv's with different constraints where different projects are run/tested. System/user wide configuration forbids doing many venv's and project settings doesn't allow running with different set of constraints.Having configuration files within the venv is also a feature that pip supports: https://pip.pypa.io/en/stable/topics/configuration/#location
Test Plan
Manually tested by creating venv and adding
uv.toml
there -> constraints were resolved correctly.