-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Abort install if Requires-Python do not match the running version #3846
Conversation
5788ecd
to
6879189
Compare
Yes, it should have an escape hatch. |
Escape hatch added. This PR would also help avoid further issues like #3390 |
b566ab1
to
ae13022
Compare
logger.debug( | ||
"Package %s has an invalid Requires-Python entry %s - %s" % ( | ||
dist.project_name, requires_python, e)) | ||
return |
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.
Should it return without raising if invalid specifier ?
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.
We used to ignore this information, so I'd say it is ok to keep ignoring it if we cannot parse it.
I'll bump the log level to warning to alert the user though.
ae13022
to
0ec85fd
Compare
8b5e748
to
c0db7e8
Compare
This is exciting! |
c0db7e8
to
b0c7e55
Compare
b0c7e55
to
24e922d
Compare
|
||
|
||
class UnsupportedPythonVersion(InstallationError): | ||
"""Unsupported python version (related to PEP 345 Requires-Python).""" |
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.
"related to PEP 345 Requires-Python" sounds a bit clumsy. Maybe "according to Requires-Python package metadata"?
Other than the one minor comment, LGTM. |
24eb174
to
812ae9e
Compare
38b8b60
to
b43fb54
Compare
@xavfernandez |
Once pypa/setuptools#631 is merged, it should be easier to add functionnal tests
I'm wondering wheither pip should provide an escape hatch via some
--ignore-requires-python
or not.