pypa/pip — Issue #387: "pip search" crash under python3.2
Author: baverman
Created: 2011-11-08 23:51:35+00:00
State: open

~$ pip-3.2 search mysql
Exception:
Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/pip/commands/search.py", line 106, in compare_versions
return cmp(StrictVersion(version1), StrictVersion(version2))
File "/usr/lib/python3.2/distutils/version.py", line 40, in __init__
self.parse(vstring)
File "/usr/lib/python3.2/distutils/version.py", line 143, in parse
raise ValueError("invalid version number '%s'" % vstring)
ValueError: invalid version number '1.0beta'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/pip/basecommand.py", line 126, in main
self.run(options, args)
File "/usr/lib/python3.2/site-packages/pip/commands/search.py", line 34, in run
hits = transform_hits(pypi_hits)
File "/usr/lib/python3.2/site-packages/pip/commands/search.py", line 67, in transform_hits
if version == highest_version(packages[name]['versions']):
File "/usr/lib/python3.2/site-packages/pip/commands/search.py", line 113, in highest_version
return reduce((lambda v1, v2: compare_versions(v1, v2) == 1 and v1 or v2), versions)
File "/usr/lib/python3.2/site-packages/pip/commands/search.py", line 113, in
return reduce((lambda v1, v2: compare_versions(v1, v2) == 1 and v1 or v2), versions)
File "/usr/lib/python3.2/site-packages/pip/commands/search.py", line 109, in compare_versions
return cmp(LooseVersion(version1), LooseVersion(version2))
File "/usr/lib/python3.2/site-packages/pip/backwardcompat.py", line 54, in cmp
return (a > b) - (a < b)
File "/usr/lib/python3.2/distutils/version.py", line 70, in __gt__
c = self._cmp(other)
File "/usr/lib/python3.2/distutils/version.py", line 343, in _cmp
if self.version < other.version:
TypeError: unorderable types: int() < str()