[Python-modules-team] Bug#744145: pip3 breaks after upgrading requests

Chris Kuehl ckuehl at ocf.berkeley.edu
Fri Jan 23 09:34:16 UTC 2015


Hi maintainer,

I am able to reproduce this reliably.

On a clean jessie or sid system (does not happen on wheezy):

    root# apt-get install python3 python3-pip
    root# pip3 install --upgrade requests

After this, every invocation of pip3 fails:

    root# pip3
    Traceback (most recent call last):
      File "/usr/bin/pip3", line 9, in <module>
        load_entry_point('pip==1.5.6', 'console_scripts', 'pip3')()
      File "/usr/lib/python3/dist-packages/pkg_resources.py", line 356, in load_entry_point
        return get_distribution(dist).load_entry_point(group, name)
      File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2476, in load_entry_point
        return ep.load()
      File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2190, in load
        ['__name__'])
      File "/usr/lib/python3/dist-packages/pip/__init__.py", line 61, in <module>
        from pip.vcs import git, mercurial, subversion, bazaar  # noqa
      File "/usr/lib/python3/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
        from pip.download import path_to_url
      File "/usr/lib/python3/dist-packages/pip/download.py", line 25, in <module>
        from requests.compat import IncompleteRead
    ImportError: cannot import name 'IncompleteRead'

The version of requests which the upgrade installs is currently 2.5.1.

This renders pip unusable for many cases, and can break not just pip but
also other Python packages. In particular, any Python package that
depends on requests which you upgrade using system pip will permanently
break pip.

Thanks for looking into this -- I'm more than happy to help with testing
any fixes!

Happy Friday,
Chris



More information about the Python-modules-team mailing list