-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Listing outdated packages fails #5757
Comments
I can reproduce this as well. Environment
|
Here are my findings after investigating: this error comes from Replacing the following lines in from pip._vendor.packaging import specifiers
from pip._vendor.packaging.utils import canonicalize_name
from pip._vendor.packaging.version import parse as parse_version with from packaging import specifiers
from packaging.utils import canonicalize_name
from packaging.version import parse as parse_version fixes the issue, which makes me believe the vendoring process in |
Can you reproduce with a pristine version of pip (that is a version that is not unvendored)? |
No, cloning the |
IMHO, any unvendored pip is a (subtly) broken pip... I can't reproduce this locally, with or without the distribution version of pip (I'm on Arch Linux too). What's the output of |
@benoit-pierre : you'll laugh, but after trying stuff the error seems to be gone. I'm not sure what made it go away, but I may have had an alternate |
I don't think a user installed |
I can trigger the error again after installing $ pip install --user -U setuptools --force-reinstall Installing |
Yep, I can reproduce it too! |
So installing I can't really see a way out of this though, unless preventing |
I guess the answer is that if you're de-vendoring, you need to de-vendor both pip and setuptools? |
That happens when you let your package manager (and packagers) do everything for you, but if a user aggressively updates EDIT: not instance checking when comparing versions and relying on duck-typing would be preferable but I understand why you'd want to do that verification. |
Don't use the distribution versions of setuptools/pkg_resources. Vendoring is there exactly to protect against this kind of issues. It really make no sense for a distribution like Arch Linux, whose pretty much always up-to-date, to unvendor pip/setuptools. |
I think a new field should be added to the new issue template, or the version field should also mention how pip is installed (distribution package? from PyPi?). |
Unfortunately, I think there may always be the case of an unwanted upgrade: if you run a |
Should we also add a note to the vendoring README with advice to help packagers avoid this situation? |
Sounds good to me! |
This issue looks like it's caused by changes that Debian made in their pip packaging. Please file a bug with Debian, with Closing this, since I don't think we can do anything about this on our end. |
Environment
Description
Uncaught exception occurs when checking for outdated packages, crashing pip. Apparently the version number is now a type, but does not support
>
-comparison.Expected behavior
Print a list of outdated packages
How to Reproduce
Simply run
pip list --outdated
Output
The text was updated successfully, but these errors were encountered: