Skip to content
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

Merged
merged 2 commits into from
Jun 14, 2024
Merged

Conversation

ibraheemdev
Copy link
Member

Summary

Support unnamed URL requirements in uv add. For example, uv add git+https://github.com/pallets/flask.

Part of #3959.

Comment on lines +43 to +44
// Discover or create the virtual environment.
let venv = project::init_environment(project.workspace(), python.as_deref(), cache, printer)?;
Copy link
Member

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())
Copy link
Member

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.

python,
} = args;

Self {
requirements,
python,
refresh: Refresh::from(refresh),
settings: ResolverSettings::combine(resolver_options(resolver, build), filesystem),
Copy link
Member

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?

Copy link
Member

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

Copy link
Member Author

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.

@zanieb zanieb added the preview Experimental behavior label Jun 14, 2024
@ibraheemdev ibraheemdev merged commit 042fdea into main Jun 14, 2024
47 checks passed
@ibraheemdev ibraheemdev deleted the ibraheem/uv-add-unnamed branch June 14, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants