diff -Nru lazr.restfulclient-0.14.0/debian/changelog lazr.restfulclient-0.14.2/debian/changelog --- lazr.restfulclient-0.14.0/debian/changelog 2018-05-08 09:19:35.000000000 +0000 +++ lazr.restfulclient-0.14.2/debian/changelog 2018-11-17 17:28:17.000000000 +0000 @@ -1,3 +1,25 @@ +lazr.restfulclient (0.14.2-1) unstable; urgency=medium + + * Team upload. + * New upstream release. + * Explicitly depend on python{,3}-httplib2. + + -- Colin Watson Sat, 17 Nov 2018 17:28:17 +0000 + +lazr.restfulclient (0.14.1-1) unstable; urgency=medium + + * Team upload. + + [ Ondřej Nový ] + * d/control: Remove ancient X-Python-Version field + * d/control: Remove ancient X-Python3-Version field + * Convert git repository from git-dpm to gbp layout + + [ Colin Watson ] + * New upstream release. + + -- Colin Watson Fri, 16 Nov 2018 10:26:17 +0000 + lazr.restfulclient (0.14.0-1) unstable; urgency=medium [ Colin Watson ] diff -Nru lazr.restfulclient-0.14.0/debian/control lazr.restfulclient-0.14.2/debian/control --- lazr.restfulclient-0.14.0/debian/control 2018-05-08 08:48:23.000000000 +0000 +++ lazr.restfulclient-0.14.2/debian/control 2018-11-17 17:22:01.000000000 +0000 @@ -15,12 +15,11 @@ Homepage: https://launchpad.net/lazr.restfulclient Vcs-Git: https://salsa.debian.org/python-team/modules/lazr.restfulclient Vcs-Browser: https://salsa.debian.org/python-team/modules/lazr.restfulclient -X-Python-Version: >= 2.4 -X-Python3-Version: >= 3.2 Package: python-lazr.restfulclient Architecture: all Depends: + python-httplib2, python-lazr.uri, python-pkg-resources, python-simplejson, @@ -35,6 +34,7 @@ Package: python3-lazr.restfulclient Architecture: all Depends: + python3-httplib2 (>= 0.7.7), python3-lazr.uri, python3-pkg-resources, python3-simplejson, diff -Nru lazr.restfulclient-0.14.0/debian/.git-dpm lazr.restfulclient-0.14.2/debian/.git-dpm --- lazr.restfulclient-0.14.0/debian/.git-dpm 2018-05-08 08:42:37.000000000 +0000 +++ lazr.restfulclient-0.14.2/debian/.git-dpm 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -# see git-dpm(1) from git-dpm package -b843b16be3690d896d958931d0618a2eb034bac8 -b843b16be3690d896d958931d0618a2eb034bac8 -b843b16be3690d896d958931d0618a2eb034bac8 -b843b16be3690d896d958931d0618a2eb034bac8 -lazr.restfulclient_0.14.0.orig.tar.gz -bdffb7628c5af8db166f19c949be3a1e9fa85b97 -55355 -debianTag="debian/%e%v" -patchedTag="patched/%e%v" -upstreamTag="upstream/%e%u" diff -Nru lazr.restfulclient-0.14.0/PKG-INFO lazr.restfulclient-0.14.2/PKG-INFO --- lazr.restfulclient-0.14.0/PKG-INFO 2018-05-08 08:29:00.000000000 +0000 +++ lazr.restfulclient-0.14.2/PKG-INFO 2018-11-17 17:09:31.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: lazr.restfulclient -Version: 0.14.0 +Version: 0.14.2 Summary: A programmable client library that takes advantage of the commonalities among Home-page: https://launchpad.net/lazr.restfulclient Maintainer: LAZR Developers @@ -61,6 +61,19 @@ NEWS for lazr.restfulclient =========================== + 0.14.2 (2018-11-17) + =================== + + - Fix compatibility with httplib2 0.12.0 for Python 3. [bug=1803754] + - Really fix compatibility with httplib2 < 0.9. + - Fix compatibility with httplib2 0.9 for Python 3. + - Require httplib >= 0.7.7 for Python 3. + + 0.14.1 (2018-11-16) + =================== + + - Add compatibility with httplib2 0.12.0. [bug=1803558] + 0.14.0 (2018-05-08) =================== diff -Nru lazr.restfulclient-0.14.0/setup.py lazr.restfulclient-0.14.2/setup.py --- lazr.restfulclient-0.14.0/setup.py 2018-05-08 07:43:28.000000000 +0000 +++ lazr.restfulclient-0.14.2/setup.py 2018-11-17 17:05:58.000000000 +0000 @@ -64,7 +64,8 @@ license='LGPL v3', install_requires=[ 'distro', - 'httplib2', + 'httplib2; python_version < "3"', + 'httplib2>=0.7.7; python_version >= "3"', 'oauthlib', 'setuptools', 'six', diff -Nru lazr.restfulclient-0.14.0/src/lazr/restfulclient/authorize/oauth.py lazr.restfulclient-0.14.2/src/lazr/restfulclient/authorize/oauth.py --- lazr.restfulclient-0.14.0/src/lazr/restfulclient/authorize/oauth.py 2018-05-08 07:43:04.000000000 +0000 +++ lazr.restfulclient-0.14.2/src/lazr/restfulclient/authorize/oauth.py 2018-11-17 14:16:51.000000000 +0000 @@ -258,4 +258,9 @@ client.resource_owner_key = TruthyString(client.resource_owner_key) _, signed_headers, _ = client.sign(absolute_uri) for key, value in signed_headers.items(): - headers[key.encode('UTF-8')] = value.encode('UTF-8') + # client.sign returns Unicode headers; convert these to native + # strings. + if six.PY2: + key = key.encode('UTF-8') + value = value.encode('UTF-8') + headers[key] = value diff -Nru lazr.restfulclient-0.14.0/src/lazr/restfulclient/_browser.py lazr.restfulclient-0.14.2/src/lazr/restfulclient/_browser.py --- lazr.restfulclient-0.14.0/src/lazr/restfulclient/_browser.py 2017-09-04 14:30:28.000000000 +0000 +++ lazr.restfulclient-0.14.2/src/lazr/restfulclient/_browser.py 2018-11-17 13:11:35.000000000 +0000 @@ -32,7 +32,9 @@ import atexit import errno +from hashlib import md5 import os +import re import shutil import sys import tempfile @@ -41,7 +43,6 @@ from time import sleep from httplib2 import ( Http, - proxy_info_from_environment, urlnorm, ) try: @@ -81,22 +82,28 @@ str_types = str -# A drop-in replacement for httplib2's safename. -from httplib2 import _md5, re_url_scheme, re_slash +# A drop-in replacement for httplib2's safename. Substantially borrowed +# from httplib2, but its cache name format changed in 0.12.0 and we want to +# stick with the previous version. + +re_url_scheme = re.compile(br'^\w+://') +re_url_scheme_s = re.compile(r'^\w+://') +re_slash = re.compile(br'[?/:|]+') + + def safename(filename): """Return a filename suitable for the cache. Strips dangerous and common characters to create a filename we can use to store the cache in. """ - try: - if isinstance(filename, unicode_type): - filename_match = filename.encode('utf-8') + if isinstance(filename, bytes): + filename_match = filename.decode('utf-8') else: filename_match = filename - if re_url_scheme.match(filename_match): + if re_url_scheme_s.match(filename_match): if isinstance(filename, bytes): filename = filename.decode('utf-8') filename = filename.encode('idna') @@ -106,7 +113,7 @@ pass if isinstance(filename, unicode_type): filename = filename.encode('utf-8') - filemd5 = _md5(filename).hexdigest() + filemd5 = md5(filename).hexdigest() filename = re_url_scheme.sub(b"", filename) filename = re_slash.sub(b",", filename) @@ -127,7 +134,7 @@ maximum_filename_length = RestfulHttp.maximum_cache_filename_length maximum_length_before_md5_sum = maximum_filename_length - 32 - 1 if len(filename) > maximum_length_before_md5_sum: - filename=filename[:maximum_length_before_md5_sum] + filename = filename[:maximum_length_before_md5_sum] return ",".join((filename.decode('utf-8'), filemd5)) diff -Nru lazr.restfulclient-0.14.0/src/lazr/restfulclient/docs/NEWS.rst lazr.restfulclient-0.14.2/src/lazr/restfulclient/docs/NEWS.rst --- lazr.restfulclient-0.14.0/src/lazr/restfulclient/docs/NEWS.rst 2018-05-08 08:24:02.000000000 +0000 +++ lazr.restfulclient-0.14.2/src/lazr/restfulclient/docs/NEWS.rst 2018-11-17 17:09:18.000000000 +0000 @@ -2,6 +2,19 @@ NEWS for lazr.restfulclient =========================== +0.14.2 (2018-11-17) +=================== + + - Fix compatibility with httplib2 0.12.0 for Python 3. [bug=1803754] + - Really fix compatibility with httplib2 < 0.9. + - Fix compatibility with httplib2 0.9 for Python 3. + - Require httplib >= 0.7.7 for Python 3. + +0.14.1 (2018-11-16) +=================== + + - Add compatibility with httplib2 0.12.0. [bug=1803558] + 0.14.0 (2018-05-08) =================== diff -Nru lazr.restfulclient-0.14.0/src/lazr/restfulclient/tests/test_atomicfilecache.py lazr.restfulclient-0.14.2/src/lazr/restfulclient/tests/test_atomicfilecache.py --- lazr.restfulclient-0.14.0/src/lazr/restfulclient/tests/test_atomicfilecache.py 2014-12-11 14:01:25.000000000 +0000 +++ lazr.restfulclient-0.14.2/src/lazr/restfulclient/tests/test_atomicfilecache.py 2018-11-17 12:36:58.000000000 +0000 @@ -32,7 +32,8 @@ import httplib2 -from lazr.restfulclient._browser import AtomicFileCache +from lazr.restfulclient._browser import ( + AtomicFileCache, safename) class TestFileCacheInterface(unittest.TestCase): @@ -53,7 +54,7 @@ def make_file_cache(self): """Make a FileCache-like object to be tested.""" - return self.file_cache_factory(self.cache_dir) + return self.file_cache_factory(self.cache_dir, safename) def test_get_non_existent_key(self): # get() returns None if the key does not exist. diff -Nru lazr.restfulclient-0.14.0/src/lazr/restfulclient/version.txt lazr.restfulclient-0.14.2/src/lazr/restfulclient/version.txt --- lazr.restfulclient-0.14.0/src/lazr/restfulclient/version.txt 2018-05-08 08:18:49.000000000 +0000 +++ lazr.restfulclient-0.14.2/src/lazr/restfulclient/version.txt 2018-11-17 17:09:20.000000000 +0000 @@ -1 +1 @@ -0.14.0 +0.14.2 diff -Nru lazr.restfulclient-0.14.0/src/lazr.restfulclient.egg-info/PKG-INFO lazr.restfulclient-0.14.2/src/lazr.restfulclient.egg-info/PKG-INFO --- lazr.restfulclient-0.14.0/src/lazr.restfulclient.egg-info/PKG-INFO 2018-05-08 08:29:00.000000000 +0000 +++ lazr.restfulclient-0.14.2/src/lazr.restfulclient.egg-info/PKG-INFO 2018-11-17 17:09:31.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: lazr.restfulclient -Version: 0.14.0 +Version: 0.14.2 Summary: A programmable client library that takes advantage of the commonalities among Home-page: https://launchpad.net/lazr.restfulclient Maintainer: LAZR Developers @@ -61,6 +61,19 @@ NEWS for lazr.restfulclient =========================== + 0.14.2 (2018-11-17) + =================== + + - Fix compatibility with httplib2 0.12.0 for Python 3. [bug=1803754] + - Really fix compatibility with httplib2 < 0.9. + - Fix compatibility with httplib2 0.9 for Python 3. + - Require httplib >= 0.7.7 for Python 3. + + 0.14.1 (2018-11-16) + =================== + + - Add compatibility with httplib2 0.12.0. [bug=1803558] + 0.14.0 (2018-05-08) =================== diff -Nru lazr.restfulclient-0.14.0/src/lazr.restfulclient.egg-info/requires.txt lazr.restfulclient-0.14.2/src/lazr.restfulclient.egg-info/requires.txt --- lazr.restfulclient-0.14.0/src/lazr.restfulclient.egg-info/requires.txt 2018-05-08 08:29:00.000000000 +0000 +++ lazr.restfulclient-0.14.2/src/lazr.restfulclient.egg-info/requires.txt 2018-11-17 17:09:31.000000000 +0000 @@ -1,10 +1,15 @@ distro -httplib2 oauthlib setuptools six wadllib>=1.1.4 +[:python_version < "3"] +httplib2 + +[:python_version >= "3"] +httplib2>=0.7.7 + [docs] Sphinx