Incompatible versions when using ~=
with truncated versions
#10644
Labels
resolution: duplicate
Duplicate of an existing issue/PR
~=
with truncated versions
#10644
Description
It seems that the latest version of
pip
has some issues resolving packages which have multiple "compatible release" (i.e.~=
) version specifications, particularly if some of them are truncated. For example,six ~= 1.15
andsix ~= 1.15.0
(e.g.pip install six~=1.15 six~=1.15.0
).The result is that
pip
will fail with anInconsistentCandidate
exception (see full output below).This seems to have been introduced with, at least,
pip == 21.3.1
. We're not able to reproduce it withpip == 21.2.4
.Expected behavior
Following the example above, each of those requirements should be equivalent to:
six ~= 1.15
, equivalent tosix >= 1.15, == 1.*
six ~= 1.15.0
, equivalent tosix >= 1.15.0, == 1.15.*
Therefore,
pip
should be able to identify anysix == 1.15.x
release as compatible.pip version
21.3.1
Python version
3.7.12
OS
Linux
How to Reproduce
pip install six~=1.15 six~=1.15.0
.InconsistentCandidate
exception.Output
Code of Conduct
The text was updated successfully, but these errors were encountered: