[Python-modules-team] Bug#859504: python-requests breaks packages using urllib3
Ilias Tsitsimpis
i.tsitsimpis at gmail.com
Tue Apr 4 13:17:54 UTC 2017
Package: python-requests
Version: 2.12.4-1
Severity: important
Tags: patch
Hello,
thank you for maintaining python-requests.
It seems that patch use-pip-unbundling.patch doen not work as expected:
>>> import sys, urllib3
>>> from urllib3.exceptions import HTTPError
>>> urllib3.exceptions.HTTPError is HTTPError
True
>>> sys.modules["urllib3.exceptions"] is urllib3.exceptions
True
>>> import requests
>>> urllib3.exceptions.HTTPError is HTTPError
False
>>> sys.modules["urllib3.exceptions"] is urllib3.exceptions
False
This causes (otherwise correct) Python programs to fail by simply
importing the 'requests' module. The solution proposed by upstream[1]
doesn't work either.
[1] https://github.com/kennethreitz/requests/blob/master/requests/packages/__init__.py
Attached is a patch that works for me and seems to fix the above bug.
It would be great if this could be fixed for stretch.
Best,
--
Ilias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: requests.patch
Type: text/x-diff
Size: 3178 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20170404/4ad028ff/attachment.patch>
More information about the Python-modules-team
mailing list