[Python-modules-commits] [python-pip] 01/03: When calling `pip list` where some system packages are installed with non-PEP 440 compliant version numbers, this assertion gets tripped. E.g. python-apt's 1.0.0~beta3.1ubuntu1. In those cases, the package's requirements use the PEP 440 '===' arbitrary equality operator, which isn't supported in pip 1.5.6. This allows the assertion to pass in those cases, without any known side effects. Thanks to upstream developer Donald Stufft for assistance.

Barry Warsaw barry at moszumanska.debian.org
Tue Aug 18 15:36:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

barry pushed a commit to branch release-1.5.6
in repository python-pip.

commit 6cddedaac287e8d517b64d3858de71a405625afb
Author: Barry Warsaw <barry at debian.org>
Date:   Tue Aug 18 11:05:51 2015 -0400

    When calling `pip list` where some system packages are installed with non-PEP
    440 compliant version numbers, this assertion gets tripped.  E.g. python-apt's
    1.0.0~beta3.1ubuntu1.  In those cases, the package's requirements use the PEP
    440 '===' arbitrary equality operator, which isn't supported in pip 1.5.6.
    This allows the assertion to pass in those cases, without any known side
    effects.  Thanks to upstream developer Donald Stufft for assistance.
    
    Patch-Name: pep-440-arbitrary-equality-operator.patch
    Forwarded: not-needed
---
 pip/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pip/__init__.py b/pip/__init__.py
index eba984e..1c6deb3 100755
--- a/pip/__init__.py
+++ b/pip/__init__.py
@@ -296,7 +296,7 @@ class FrozenRequirement(object):
             editable = False
             req = dist.as_requirement()
             specs = req.specs
-            assert len(specs) == 1 and specs[0][0] == '=='
+            assert len(specs) == 1 and specs[0][0] in ('==', '==='), specs
             version = specs[0][1]
             ver_match = cls._rev_re.search(version)
             date_match = cls._date_re.search(version)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pip.git



More information about the Python-modules-commits mailing list