[Python-modules-team] Bug#912379: Bug #912379: /usr/bin/pip3: TypeError on "list --outdated": uses different Version implementations

Scott Kitterman debian at kitterman.com
Wed Apr 1 04:21:46 BST 2020


On Tue, 30 Oct 2018 21:50:36 +0100 Ben Wiederhake 
<BenWiederhake.GitHub at gmx.de> wrote:
> Package: python3-pip
> Version: 9.0.1-2.3
> Severity: normal
> File: /usr/bin/pip3
> 
> Dear Maintainer,
> 
> I'm having trouble running this command:
> 
>     pip3 list --outdated
> 
> Expected behavior: A list of outdated, local packages
> Actual behavior: TypeError
> 
> Full error message:
> 
>     Traceback (most recent call last):
>       File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in
> main
>         status = self.run(options, args)
>       File "/usr/lib/python3/dist-packages/pip/commands/list.py", line 157, 
in
> run
>         packages = self.get_outdated(packages, options)
>       File "/usr/lib/python3/dist-packages/pip/commands/list.py", line 168, 
in
> get_outdated
>         dist for dist in self.iter_packages_latest_infos(packages, options)
>       File "/usr/lib/python3/dist-packages/pip/commands/list.py", line 169, 
in
> <listcomp>
>         if dist.latest_version > dist.parsed_version
>     TypeError: '>' not supported between instances of 'Version' and 
'Version'
> 
> This is not Debian #878082.
> 
> Arch had a similar problem, there it was a packaging error:
> 
> https://github.com/pypa/pip/issues/5429
> 
> Could it be that the Debian package has a similar issue?

The problem turns out to be that setuptools and pip have different approaches 
for managing the namespace for packages they vendor and they are incompatible.  
Thanks to the incomparable dstufft for figuring it out.  The attached patch 
works around this incompatibility.  I've tested it with pip 20.2 on unstable 
and it resolves the issue.  This or something similar should work on earlier 
versions too.

Scott K
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pip.versions.patch
Type: text/x-patch
Size: 1003 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/python-modules-team/attachments/20200331/51393792/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://alioth-lists.debian.net/pipermail/python-modules-team/attachments/20200331/51393792/attachment.sig>


More information about the Python-modules-team mailing list