aboutsummaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorDaniele Tricoli <eriol@mornie.org>2013-01-19 07:36:09 +0000
committerDaniele Tricoli <eriol@mornie.org>2013-01-19 07:36:09 +0000
commit2bad45023e133f736dad5892e7b06371b3da7e4a (patch)
treecf4a8168373aca77fd5a4aefe36a823b1c882f84 /debian/patches
parentc01e85089cacc00791f9c238b7d6759c3345b5fd (diff)
downloadpython-requests-2bad45023e133f736dad5892e7b06371b3da7e4a.tar
python-requests-2bad45023e133f736dad5892e7b06371b3da7e4a.tar.gz
Use the system python-chardet and python-urllib3 instead of the embedded copies
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/02_use-system-chardet-and-urllib3.patch77
-rw-r--r--debian/patches/series1
2 files changed, 78 insertions, 0 deletions
diff --git a/debian/patches/02_use-system-chardet-and-urllib3.patch b/debian/patches/02_use-system-chardet-and-urllib3.patch
new file mode 100644
index 0000000..62d14ef
--- /dev/null
+++ b/debian/patches/02_use-system-chardet-and-urllib3.patch
@@ -0,0 +1,77 @@
+Description: Use the system python-chardet and python-urllib3 instead of the
+ embedded copies.
+Author: Daniele Tricoli <eriol@mornie.org>
+Forwarded: not-needed
+Last-Update: 2013-01-19
+
+--- a/requests/adapters.py
++++ b/requests/adapters.py
+@@ -11,17 +11,17 @@
+ import socket
+
+ from .models import Response
+-from .packages.urllib3.poolmanager import PoolManager, proxy_from_url
+-from .packages.urllib3.response import HTTPResponse
++from urllib3.poolmanager import PoolManager, proxy_from_url
++from urllib3.response import HTTPResponse
+ from .hooks import dispatch_hook
+ from .compat import urlparse, basestring, urldefrag
+ from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers,
+ prepend_scheme_if_needed)
+ from .structures import CaseInsensitiveDict
+-from .packages.urllib3.exceptions import MaxRetryError
+-from .packages.urllib3.exceptions import TimeoutError
+-from .packages.urllib3.exceptions import SSLError as _SSLError
+-from .packages.urllib3.exceptions import HTTPError as _HTTPError
++from urllib3.exceptions import MaxRetryError
++from urllib3.exceptions import TimeoutError
++from urllib3.exceptions import SSLError as _SSLError
++from urllib3.exceptions import HTTPError as _HTTPError
+ from .cookies import extract_cookies_to_jar
+ from .exceptions import ConnectionError, Timeout, SSLError
+
+--- a/requests/compat.py
++++ b/requests/compat.py
+@@ -4,7 +4,7 @@
+ pythoncompat
+ """
+
+-from .packages import charade as chardet
++import chardet
+
+ import sys
+
+@@ -89,7 +89,7 @@
+ import cookielib
+ from Cookie import Morsel
+ from StringIO import StringIO
+- from .packages.urllib3.packages.ordered_dict import OrderedDict
++ from urllib3.packages.ordered_dict import OrderedDict
+
+ builtin_str = str
+ bytes = str
+--- a/requests/models.py
++++ b/requests/models.py
+@@ -17,7 +17,7 @@
+
+ from .auth import HTTPBasicAuth
+ from .cookies import cookiejar_from_dict, get_cookie_header
+-from .packages.urllib3.filepost import encode_multipart_formdata
++from urllib3.filepost import encode_multipart_formdata
+ from .exceptions import HTTPError, RequestException, MissingSchema, InvalidURL
+ from .utils import (
+ stream_untransfer, guess_filename, requote_uri,
+--- a/setup.py
++++ b/setup.py
+@@ -16,11 +16,6 @@
+
+ packages = [
+ 'requests',
+- 'requests.packages',
+- 'requests.packages.charade',
+- 'requests.packages.urllib3',
+- 'requests.packages.urllib3.packages',
+- 'requests.packages.urllib3.packages.ssl_match_hostname'
+ ]
+
+ requires = []
diff --git a/debian/patches/series b/debian/patches/series
index 29a09e4..632785a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
01_use-system-ca-certificates.patch
+02_use-system-chardet-and-urllib3.patch