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

Pin named indexes in uv add #7747

Open
wants to merge 1 commit into
base: charlie/index-api-uv-add
Choose a base branch
from

Conversation

charliermarsh
Copy link
Member

Summary

This PR adds an index pin with uv add when the user provides exactly one named index. We don't pin if the user provides an unnamed index, or if they provide multiple indexes.

We probably could pin on multiple indexes by writing the sources after resolution, if that's desirable. But we have no idea which index the user expects each package to come from.

Possible extensions:

  • uv add --no-pin to avoid this pinning.
  • Warn if they provide a single, unnamed index? I'm not sure if that's worth a warn. Open to input.

@charliermarsh charliermarsh added enhancement New feature or request cli Related to the command line interface labels Sep 27, 2024
@charliermarsh charliermarsh marked this pull request as ready for review September 27, 2024 19:45
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 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant