diff options
author | Daniele Tricoli <eriol@mornie.org> | 2015-08-23 19:23:30 +0000 |
---|---|---|
committer | Daniele Tricoli <eriol@mornie.org> | 2015-08-23 19:23:30 +0000 |
commit | 7b8299677ffa5a97de4523e300b754e50824387f (patch) | |
tree | 2ff484fa02842baaf45e3c370e183a28ea490dc0 | |
parent | 43ba3c053bdda627e2b545511c71e74c550bc75f (diff) | |
download | python-urllib3-7b8299677ffa5a97de4523e300b754e50824387f.tar python-urllib3-7b8299677ffa5a97de4523e300b754e50824387f.tar.gz |
Add debian/patches/06_rely-on-six-to-import-httplib-or-http.client.patch
Rely on six to import httplib or http.client. Thanks to Edward Betts
for the report. (Closes: #796356)
-rw-r--r-- | debian/changelog | 8 | ||||
-rw-r--r-- | debian/patches/06_rely-on-six-to-import-httplib-or-http.client.patch | 32 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 41 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 3fdef6e..f4195d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +python-urllib3 (1.11-2) UNRELEASED; urgency=medium + + * debian/patches/06_rely-on-six-to-import-httplib-or-http.client.patch + - Rely on six to import httplib or http.client. Thanks to Edward Betts + for the report. (Closes: #796356) + + -- Daniele Tricoli <eriol@mornie.org> Sun, 23 Aug 2015 21:19:59 +0200 + python-urllib3 (1.11-1) unstable; urgency=medium * New upstream release. diff --git a/debian/patches/06_rely-on-six-to-import-httplib-or-http.client.patch b/debian/patches/06_rely-on-six-to-import-httplib-or-http.client.patch new file mode 100644 index 0000000..a6e4282 --- /dev/null +++ b/debian/patches/06_rely-on-six-to-import-httplib-or-http.client.patch @@ -0,0 +1,32 @@ +Description: Rely on six to import httplib or http.client. +Origin: https://github.com/shazow/urllib3/commit/f4eb94bc36277d5d584683a03fc9eb3950429a15 + +--- a/urllib3/response.py ++++ b/urllib3/response.py +@@ -1,7 +1,3 @@ +-try: +- import http.client as httplib +-except ImportError: +- import httplib + from contextlib import contextmanager + import zlib + import io +@@ -12,6 +8,7 @@ + ProtocolError, DecodeError, ReadTimeoutError, ResponseNotChunked + ) + from six import string_types as basestring, binary_type, PY3 ++from six.moves import http_client as httplib + from .connection import HTTPException, BaseSSLError + from .util.response import is_fp_closed, is_response_to_head + +--- a/urllib3/util/response.py ++++ b/urllib3/util/response.py +@@ -1,7 +1,4 @@ +-try: +- import http.client as httplib +-except ImportError: +- import httplib ++from six.moves import http_client as httplib + + from ..exceptions import HeaderParsingError + diff --git a/debian/patches/series b/debian/patches/series index b77d657..b91b93d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ 03_force_setuptools.patch 04_relax_nosetests_options.patch 05_avoid-embedded-ssl-match-hostname.patch +06_rely-on-six-to-import-httplib-or-http.client.patch |