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

Requires-Python implementation, take 2 #7960

Merged
merged 7 commits into from
Apr 2, 2020

Conversation

uranusjr
Copy link
Member

@uranusjr uranusjr commented Apr 2, 2020

Also see discussions in uranusjr@632df57

If a dist contains Requires-Python metadata, it is converted into a
Requirement for the resolver based on whether the Requires-Python
is compatible or not.

If it is compatible, an ExplicitRequirement is returned to hold the
Python information (either sys.version_info, or the user-supplied
--python-version).

If it is incompatible, a special NoMatchRequirement is returned, which
never matches to anything, generating a ResolutionImpossible to report
the Python version incompatibility.

The --ignore-requires-python flag is implemented as to not return a
Requirement for Requires-Python at all.
@uranusjr uranusjr added the skip news Does not need a NEWS file entry (eg: trivial changes) label Apr 2, 2020
Copy link
Member

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

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

LGTM!

A couple of non-blocking comments, related to debug-ability/output.

src/pip/_internal/resolution/resolvelib/candidates.py Outdated Show resolved Hide resolved
src/pip/_internal/resolution/resolvelib/requirements.py Outdated Show resolved Hide resolved
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.

Minor comments only from me, too!

@pfmoore
Copy link
Member

pfmoore commented Apr 2, 2020

LGTM, I'll merge once CI completes

@pfmoore pfmoore merged commit 6086f71 into pypa:master Apr 2, 2020
@uranusjr uranusjr deleted the requires-python-2 branch April 4, 2020 07:23
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 5, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation skip news Does not need a NEWS file entry (eg: trivial changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants