-
Notifications
You must be signed in to change notification settings - Fork 772
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 package lookups across multiple indexes via explicit opt-in #2815
Conversation
8a436e4
to
ba0bfd6
Compare
8a8adef
to
29c63a4
Compare
It'd be nice to also have an env variable option like: |
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.
Nice work! I like it.
29c63a4
to
1c6c606
Compare
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.
Love it! Nice work. :-)
/// the first index before moving on to the next. Further, if a version is found to be | ||
/// incompatible in the first index, we do not reconsider that version in subsequent indexes, | ||
/// even if the secondary index might contain compatible versions (e.g., variants of the same | ||
/// versions with different ABI tags or Python version constraints). |
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.
It might be worth ~one sentence mentioning that this risks dependency confusion attacks so that the "unsafe" in the name is justified here. (I know the PEP link gives the full context, but I think a one sentence call out here is important.)
(I'm assuming this is user facing docs. If not, the PEP link is enough IMO.)
Summary
This partially revives #2135 (with some modifications) to enable users to opt-in to looking for packages across multiple indexes.
The behavior is such that, in version selection, we take any compatible version from a "higher-priority" index over the compatible versions of a "lower-priority" index, even if that means we might accept an "older" version.
Closes #2775.