aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/02_use-system-chardet-and-urllib3.patch
blob: 14636c4a7d798c0144fab7697eec6950a20b6852 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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	2013-03-22 04:09:32.000000000 +0000
+++ b/requests/adapters.py	2013-04-25 23:00:25.000000000 +0000
@@ -11,16 +11,16 @@
 import socket
 
 from .models import Response
-from .packages.urllib3.poolmanager import PoolManager, ProxyManager
-from .packages.urllib3.response import HTTPResponse
+from urllib3.poolmanager import PoolManager, proxy_from_url
+from urllib3.response import HTTPResponse
 from .compat import urlparse, basestring, urldefrag, unquote
 from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers,
                     prepend_scheme_if_needed, get_auth_from_url)
 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
 from .auth import _basic_auth_str
--- a/requests/compat.py	2013-01-31 13:18:16.000000000 +0000
+++ b/requests/compat.py	2013-04-25 23:04:23.000000000 +0000
@@ -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	2013-03-31 05:22:03.000000000 +0000
+++ b/requests/models.py	2013-04-25 23:07:32.000000000 +0000
@@ -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, get_auth_from_url, requote_uri,
--- a/setup.py	2013-01-24 01:08:39.000000000 +0000
+++ b/setup.py	2013-04-25 23:09:21.000000000 +0000
@@ -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 = []