pip breaks after upgrading python package "requests"

Bug #1363642 reported by Nitzan Raz
38
This bug affects 8 people
Affects Status Importance Assigned to Milestone
python-pip (Debian)
Fix Released
Unknown
python-pip (Ubuntu)
Fix Released
Undecided
Barry Warsaw

Bug Description

On Ubuntu 14.04, python-pip 1.5.4-1

After upgrading "requests" to 2.4, due to this commit:
https://github.com/kennethreitz/requests/commit/47d0517d66e8cf5832768262221f0357ae134ad1
"IncompleteRead" is removed from "requests.compat" and any pip invokation results in:

user@server:/tmp/pip/pip$ pip
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 356, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2472, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2186, in load
    ['__name__'])
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 11, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar # noqa
  File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
    from pip.download import path_to_url
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 25, in <module>
    from requests.compat import IncompleteRead
ImportError: cannot import name IncompleteRead

Woraround: Downgrade to requests=2.3.0 using easy_install:
sudo easy_install requests==2.3.0

Does not happen in Debian Wheezy (seems not to rely on "requests" at all in their version)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python-pip (Ubuntu):
status: New → Confirmed
Revision history for this message
Simon Davy (bloodearnest) wrote :

Looks like a fix is in progress upstream: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766419#23

Revision history for this message
Barry Warsaw (barry) wrote :

I think this is a different bug than the Debian one referenced in comment #2. It's actually

It's reproducible with:

$ pip install --upgrade --user requests
$ pip install --upgrade --user mistune

(any package after upgrading requests will trigger it)

I think the problem is that the wheels are only used inside a venv, but should probably be used everywhere. They are in /usr/share/python-wheels outside the venv though.

Revision history for this message
Barry Warsaw (barry) wrote :
Barry Warsaw (barry)
Changed in python-pip (Ubuntu):
assignee: nobody → Barry Warsaw (barry)
status: Confirmed → In Progress
Changed in python-pip (Debian):
status: Unknown → Fix Committed
Changed in python-pip (Debian):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-pip - 1.5.6-5ubuntu1

---------------
python-pip (1.5.6-5ubuntu1) vivid; urgency=medium

  * Merge with Debian. Remaining changes:
    - debian/patches/set_user_default.patch: Default to --user on non
      virtualenv.
  * Merge closes LP: #1363642

python-pip (1.5.6-5) unstable; urgency=medium

  * Team upload.
  * Use the .whl files for de-vendorized dependencies both inside and
    outside the virtual environments. (Closes: #744145)
  * d/control: Bump Standards-Version with no other changes necessary.
  * d/patches/use-venv-wheels.patch: Renamed to use-wheels.patch
 -- Barry Warsaw <email address hidden> Sun, 01 Mar 2015 10:33:01 -0500

Changed in python-pip (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.