Doesn't work with the debian requests package.

Bug #1535162 reported by Joshua Banton
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
requests-mock
Opinion
Undecided
Unassigned
python-requests-mock (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Piggybacking off of this PR: getsentry #12

If you try to use requests-mock in Ubuntu you get this error without this change:

 ImportError: No module named packages.urllib3.response

There is a Github PR here. https://github.com/openstack/requests-mock/pull/4

Revision history for this message
Jamie Lennox (jamielennox) wrote :

I want to play purist here. requests-mock should emulate exactly what requests does and requests uses packages.urllib3 (why they do that is a way bigger question that has been fought a number of times).

If debian/ubuntu changes the way that requests is bundled it is also debian/ubuntu's responsibility to patch dependant packages. I know fedora/rhel has the same problem and patches requests-mock [1] to match requests.

If this leads to a fight about who should package what then i'll end up just fixing it upstream but this is a distro issue IMO.

[1] http://pkgs.fedoraproject.org/cgit/rpms/python-requests-mock.git/tree/0002-Use-system-urllib3-package.patch

Revision history for this message
Jamie Lennox (jamielennox) wrote :

Subscribed the ubuntu package maintainers of both requests and requests-mock for there opinions.

Changed in requests-mock:
status: New → Opinion
Revision history for this message
James Page (james-page) wrote :

Running a quick check on requests/requests-mock in 16.04; requests does provided the bundled urllib3 module, so requests-mock just dtrt.

Marking Invalid as nothing todo >= 16.04.

Changed in python-requests-mock (Ubuntu):
status: New → Invalid
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.