Description
Environment
- pip version: pip 20.0.2 from /home/ash/.virtualenvs/clean/lib/python3.7/site-packages/pip (python 3.7)
- Python version: 3.7
- OS: linux
Description
I am investigating using version epochs for a local/private "fork" of a project, and want to push out updates without accidental upgrading to the upstream version.
So I have specified my requirement as apache-airflow>=1!1.10.7+local.6
, and since there is an epoch in there (1!
prefix) I should expect that to fail. As per PEP-440 Summary of permitted suffixes and relative ordering
The epoch segment of version identifiers MUST be sorted according to the numeric value of the given epoch. If no epoch segment is present, the implicit numeric value is 0.
However it appears that the implicit epoch is being treated as 1.
Collecting apache-airflow>=1!1.10.7+local.6
Created temporary directory: /tmp/pip-unpack-jitssjpx
Starting new HTTPS connection (1): files.pythonhosted.org:443
https://files.pythonhosted.org:443 "GET /packages/d4/8e/109906b658256027467e34a9f2e0c82a133ff8b39b8f08c73ee03334b641/apache_airflow-1.10.9-py2.py3-none-any.whl HTTP/1.1" 200 4639908
Downloading apache_airflow-1.10.9-py2.py3-none-any.whl (4.6 MB)
If I change the explicit epoch I required to 2!
then it works as expected:
No matching distribution found for apache-airflow>=2!
(Yes I acknowledge I am abusing version epochs for this purpose, but this behaviour is still against what the spec says)