alanhamlett/pip-update-requirements

Use of the environment-markers

VelizarVESSELINOV opened this issue · 1 comments

Usage of associated python version as a constraint, today pur is ignoring environment markers:

Before:

numpy==1.21.5; python_version<='3.7'

After:

numpy==1.22.3; python_version<='3.7'

Expected as this is the last version that supports Python 3.7:

numpy==1.21.5; python_version<='3.7'

Environment markers in a requirement line spec are similar to pypi release candidate requires_python where both are meant to match against a python version tuple, but not meant to be matched against each other.

For ex: A pypi release with requires_python of >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.* and a requirements.txt spec python_version<='3.7' how do we programmatically determine if that release matches python_version<='3.7'?