-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pip fails on different compatible ~= version specifiers #9613
Comments
The error is an integrity check in the resolver to make sure the versions it gets make sense. The resolver first requests a list of candidates to use with pip/src/pip/_internal/resolution/resolvelib/provider.py Lines 133 to 161 in bbf8466
and try to find out where the provided specifiers are not correctly applied to the returning candidate list. |
We encountered the same problem today. Thanks for the clear issue description |
This seems like a bug in |
pypa/packaging#421 was fixed. Can this be fixed in pip as well? What is missing? |
That needs a new packaging release, which is blocked on dropping legacy version. |
…ackages pypa/pip#9613 PiperOrigin-RevId: 466740344
…ackages pypa/pip#9613 PiperOrigin-RevId: 466997603
Is there any update here? |
packaging 22.0 was released in December 2022. Latest stable version is 23.1. Currently, pip vendors packaging 21.3: pip/src/pip/_vendor/packaging/__about__.py Lines 16 to 20 in 5e8e88e
Would a PR upgrading |
Thanks for the offer, but we need to work out how we handle the deprecation of non-PEP 440 versions. This is being worked on. |
pip version
21.0.1
Python version
3.6.8
OS
Windows 10
Additional information
$ python -VV
Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)]
Description
When using multiple
~=
version specifiers that are compatible, pip fails with an error.Expected behavior
pip should install one of the versions that satisfy both requirements.
How to Reproduce
Output
Code of Conduct
We found this problem in a pretty complex internal dependency tree. It's reproducible with a simple numpy install though.
I'd be very happy about a fix! For now, we work around this by explicitly stating version ranges, e.g.
>=4.1,<5
.The text was updated successfully, but these errors were encountered: