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

Respect the base's constraint for extra-ed package #10239

Merged
merged 1 commit into from
Jul 30, 2021

Conversation

uranusjr
Copy link
Member

Fix #10233

Copy link
Member

@pfmoore pfmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One issue with the use of contextlib, otherwise this LGTM.

src/pip/_internal/resolution/resolvelib/provider.py Outdated Show resolved Hide resolved
# "NAME[EXTRAS]" format, and parse out the name part with packaging or
# some regular expression. But since pip's resolver only spits out
# three kinds of identifiers: normalized PEP 503 names, normalized names
# plus extras, and Requires-Python, we can cheat a bit here.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, this is a reasonable shortcut to take. Yes, if we ever spit out other types of identifier, this might need to change, but the comment can act as a reminder.

@uranusjr uranusjr force-pushed the new-resolver-extra-dont-backtrack branch from 2d1d06f to 95fa4e5 Compare July 30, 2021 12:13
Copy link
Member

@sbidoul sbidoul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet. Tested and working nicely. Thanks!

@uranusjr uranusjr merged commit a5b3e1b into pypa:main Jul 30, 2021
@uranusjr uranusjr deleted the new-resolver-extra-dont-backtrack branch July 30, 2021 15:34
@uranusjr uranusjr mentioned this pull request Jul 31, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pip downloads many versions of extra'ed dependency while the exact version is pinned via a constraint
3 participants