pip install does not seem to evaluate environment markers correctly per PEP 508 #12736
Open
1 task done
Labels
project: vendored dependency
Related to a vendored dependency
type: bug
A confirmed bug or unintended behavior
Description
Note: Originally reported as an issue on uv, but upon closer consideration the behavior of
uv pip install
seems to be correct, and it ispip
that looks bugged.PEP 508 has this to say about environment markers:
Expected behavior
When an environment marker has a version comparison with a value that is not a valid PEP 440 version, the marker evaluation should fall back to the Python operation i.e. lexicographic string comparisons.
pip install
does not seem to do the "fall back to the Python behaviour" part.pip version
24.0
Python version
3.12.3
OS
Linux
How to Reproduce
I use
python:3.12.3-alpine
image as an example because it hasplatform.release()
value of "5.10.104-linuxkit" which can not be parsed as a PEP 440 version.In this context, the dependency
six==1.16.0
should have been selected and installed.Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: