Merge lp:~cjwatson/lazr.restfulclient/httplib2-compat into lp:lazr.restfulclient

Proposed by Colin Watson
Status: Merged
Merged at revision: 160
Proposed branch: lp:~cjwatson/lazr.restfulclient/httplib2-compat
Merge into: lp:lazr.restfulclient
Diff against target: 38 lines (+10/-1)
2 files modified
src/lazr/restfulclient/_browser.py (+5/-1)
src/lazr/restfulclient/docs/NEWS.rst (+5/-0)
To merge this branch: bzr merge lp:~cjwatson/lazr.restfulclient/httplib2-compat
Reviewer Review Type Date Requested Status
William Grant Approve
Review via email: mp+358886@code.launchpad.net

Commit message

Add compatibility with httplib2 0.12.0.

Description of the change

The safename hack here is still pretty gross, but this should get things minimally working again.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/lazr/restfulclient/_browser.py'
2--- src/lazr/restfulclient/_browser.py 2017-09-04 14:31:42 +0000
3+++ src/lazr/restfulclient/_browser.py 2018-11-16 01:59:34 +0000
4@@ -33,6 +33,7 @@
5 import atexit
6 import errno
7 import os
8+import re
9 import shutil
10 import sys
11 import tempfile
12@@ -82,7 +83,10 @@
13
14
15 # A drop-in replacement for httplib2's safename.
16-from httplib2 import _md5, re_url_scheme, re_slash
17+from httplib2 import _md5, re_url_scheme
18+
19+re_slash = re.compile(r'[?/:|]+')
20+
21 def safename(filename):
22 """Return a filename suitable for the cache.
23
24
25=== modified file 'src/lazr/restfulclient/docs/NEWS.rst'
26--- src/lazr/restfulclient/docs/NEWS.rst 2018-05-08 08:28:46 +0000
27+++ src/lazr/restfulclient/docs/NEWS.rst 2018-11-16 01:59:34 +0000
28@@ -2,6 +2,11 @@
29 NEWS for lazr.restfulclient
30 ===========================
31
32+0.14.1
33+======
34+
35+ - Add compatibility with httplib2 0.12.0. [bug=1803558]
36+
37 0.14.0 (2018-05-08)
38 ===================
39

Subscribers

People subscribed via source and target branches