aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog8
-rw-r--r--debian/patches/06_rely-on-six-to-import-httplib-or-http.client.patch32
-rw-r--r--debian/patches/series1
3 files changed, 41 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 3fdef6e..2617c3d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-urllib3 (1.11-2) unstable; 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