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
Pip will choose a pre-release for a package if the specifier of the package includes a pre-release version.
For example pandas>=2.1.5rc01 will currently install pandas-2.2.0rc0. But if for some operators this doesn't appear to work, for example pandas>2.1.5rc01 results in ERROR: No matching distribution found for pandas>2.1.5rc01
Expected behavior
If the specifier selects a pre-release version than Pip should look for pre-releases that match that specifier regardless of the operator choice.
pip version
23.3.2
Python version
3.11
OS
Linux
How to Reproduce
Be on a date before Pandas 2.2.0 is installed or use pypi-timemachine to set the date to 2024-01-09
The problem here is probably compounded when Pip is backtracking through transitive dependencies, in that case the user has no control over what operators are being chosen.
While unintuitive (and potentially creating logically inconsistent situations), it appears this behavior comes from the packaging library and had a reasoning behind it: pypa/packaging#776 (comment)
It also appears to me that the packaging specification is not clear enough on pre-releases and it's ambigious whether packaging is following the spec or not.
Therefore further discussion should either happen on the packaging library or with the python packaging community: https://discuss.python.org/c/packaging
Description
Pip will choose a pre-release for a package if the specifier of the package includes a pre-release version.
For example
pandas>=2.1.5rc01
will currently installpandas-2.2.0rc0
. But if for some operators this doesn't appear to work, for examplepandas>2.1.5rc01
results inERROR: No matching distribution found for pandas>2.1.5rc01
Expected behavior
If the specifier selects a pre-release version than Pip should look for pre-releases that match that specifier regardless of the operator choice.
pip version
23.3.2
Python version
3.11
OS
Linux
How to Reproduce
Output
pandas>2.1.5rc01
pandas>=2.1.5rc01
Code of Conduct
The text was updated successfully, but these errors were encountered: