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

Allow adding a dependency with no version constraint #6476

Open
skykasko opened this issue Aug 22, 2024 · 3 comments
Open

Allow adding a dependency with no version constraint #6476

skykasko opened this issue Aug 22, 2024 · 3 comments
Assignees
Labels
cli Related to the command line interface documentation Improvements or additions to documentation

Comments

@skykasko
Copy link
Contributor

uv add adds a lower bound version constraint by default. For example, calling uv add requests currently adds the dependency "requests>=2.32.3" to pyproject.toml.

It's possible to have uv use different upper and/or lower bounds, but I could not find a way to add a dependency without any version constraint at all. For example, I want the dependency "requests" added to pyproject.toml without any bounds.

The current default behavior is fine, but I think there should be some way to add an unconstrained dependency, either with a global configuration setting that changes the default behavior, or with a command-line option for uv add.

Apologies if I missed something in the documentation and this is already possible. (Of course I could edit pyproject.toml manually, but it doesn't seem like that should be necessary.)

Thanks for the great work on a fantastic project!

@zanieb
Copy link
Member

zanieb commented Aug 22, 2024

You can use --raw-sources to avoid adding a lower bound.

Thanks for the praise.

cc myself #5605 — we should cover this in the project concept documentation if we don't yet.

@zanieb zanieb added question Asking for clarification or support documentation Improvements or additions to documentation labels Aug 22, 2024
@zanieb
Copy link
Member

zanieb commented Aug 23, 2024

This is also not covered in the --raw-sources reference documentation.

@charliermarsh should we consider an easier name for this too? --raw-sources doesn't feel intuitive. Should it just be --raw?

@charliermarsh
Copy link
Member

That seems ok to me.

@zanieb zanieb added cli Related to the command line interface and removed question Asking for clarification or support labels Aug 23, 2024
@zanieb zanieb self-assigned this Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants