aboutsummaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorDaniele Tricoli <eriol@mornie.org>2015-08-23 21:19:59 +0200
committerDaniele Tricoli <eriol@mornie.org>2015-08-23 21:19:59 +0200
commit238244350ac035d1a54f14422b59062d9df48554 (patch)
treefd2fa37876ed13649371638d812b86045ab1feac /debian/patches
parente0f15937257d20d36f6ad94147e7a31980aac63f (diff)
downloadpython-urllib3-238244350ac035d1a54f14422b59062d9df48554.tar
python-urllib3-238244350ac035d1a54f14422b59062d9df48554.tar.gz
Imported Debian patch 1.11-2
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/06_rely-on-six-to-import-httplib-or-http.client.patch32
-rw-r--r--debian/patches/series1
2 files changed, 33 insertions, 0 deletions
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