You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When major.minor.patch versions are passed to python_version requirements specification (see https://www.python.org/dev/peps/pep-0508/), pip behavior is not intuitive:
docker -- run -it --entrypoint /bin/bash python:3.5-slim-stretch
root@bcd3693fbfa1:/# python --version
Python 3.5.9
# installation does not happen even though 3.5.9 > 3.5.3
root@2108678766fc:/# pip install 'typing; python_version > "3.5.3"'
Ignoring typing: markers 'python_version > "3.5.3"' don't match your environment
# installation happens even though 3.5.9 > 3.5.3
root@bcd3693fbfa1:/# pip install 'typing; python_version < "3.5.3"'
Collecting typing
Downloading typing-3.7.4.1-py3-none-any.whl (25 kB)
Installing collected packages: typing
Successfully installed typing-3.7.4.1
Correct usage seems for this scenario would be for user to pass python_full_version instead of python_version.
However, from a usability point of view, it would be better if pip alerted the user about incorrect usage of python_version rather than proceeding with behavior that does the opposite than a user's intent.
The investigation in pypa/pip#8419suggested that packaging would be a better place to implement the validation logic for python_version.
The text was updated successfully, but these errors were encountered:
tvalentyn
changed the title
Reject supplied python_version attribute if it does not follow X.Y pattern
Reject supplied python_version attribute if it does not follow X or X.Y pattern
Jun 10, 2020
Context: pypa/pip#8419.
When major.minor.patch versions are passed to python_version requirements specification (see https://www.python.org/dev/peps/pep-0508/), pip behavior is not intuitive:
Correct usage seems for this scenario would be for user to pass python_full_version instead of python_version.
However, from a usability point of view, it would be better if pip alerted the user about incorrect usage of python_version rather than proceeding with behavior that does the opposite than a user's intent.
The investigation in pypa/pip#8419 suggested that
packaging
would be a better place to implement the validation logic for python_version.The text was updated successfully, but these errors were encountered: