-
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 unnamed requirements in uv add
#4326
Conversation
// Discover or create the virtual environment. | ||
let venv = project::init_environment(project.workspace(), python.as_deref(), cache, printer)?; |
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.
Note we should only discover an interpreter not create an environment if syncing is disabled (looks like there's no toggle for that yet)
resolution_environment(python_version, python_platform, venv.interpreter())?; | ||
|
||
// Initialize the registry client. | ||
let client = RegistryClientBuilder::new(cache.clone()) |
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.
Created #4330 to track the duplication of this after declaring a BaseClientBuilder
above.
crates/uv/src/settings.rs
Outdated
python, | ||
} = args; | ||
|
||
Self { | ||
requirements, | ||
python, | ||
refresh: Refresh::from(refresh), | ||
settings: ResolverSettings::combine(resolver_options(resolver, build), filesystem), |
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.
Since add
performs a sync shouldn't it receive ResolverInstallerSettings
?
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.
Partially unrelated to your work here. cc @charliermarsh
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.
Oh yes, I think it should.
Summary
Support unnamed URL requirements in
uv add
. For example,uv add git+https://github.com/pallets/flask
.Part of #3959.