]> git.pld-linux.org Git - packages/python3-requests.git/blob - system-charade-and-urllib3.patch
- up to 2.5.0; bundle libraries for now as requests use newer lib than python provide...
[packages/python3-requests.git] / system-charade-and-urllib3.patch
1 diff -urN requests-2.5.0.org/requests/adapters.py requests-2.5.0/requests/adapters.py
2 --- requests-2.5.0.org/requests/adapters.py     2014-12-01 22:02:39.000000000 +0100
3 +++ requests-2.5.0/requests/adapters.py 2014-12-04 11:09:50.937837828 +0100
4 @@ -11,22 +11,22 @@
5  import socket
6  
7  from .models import Response
8 -from .packages.urllib3 import Retry
9 -from .packages.urllib3.poolmanager import PoolManager, proxy_from_url
10 -from .packages.urllib3.response import HTTPResponse
11 -from .packages.urllib3.util import Timeout as TimeoutSauce
12 +from urllib3 import Retry
13 +from urllib3.poolmanager import PoolManager, proxy_from_url
14 +from urllib3.response import HTTPResponse
15 +from urllib3.util import Timeout as TimeoutSauce
16  from .compat import urlparse, basestring
17  from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers,
18                      prepend_scheme_if_needed, get_auth_from_url, urldefragauth)
19  from .structures import CaseInsensitiveDict
20 -from .packages.urllib3.exceptions import ConnectTimeoutError
21 -from .packages.urllib3.exceptions import HTTPError as _HTTPError
22 -from .packages.urllib3.exceptions import MaxRetryError
23 -from .packages.urllib3.exceptions import ProxyError as _ProxyError
24 -from .packages.urllib3.exceptions import ProtocolError
25 -from .packages.urllib3.exceptions import ReadTimeoutError
26 -from .packages.urllib3.exceptions import SSLError as _SSLError
27 -from .packages.urllib3.exceptions import ResponseError
28 +from urllib3.exceptions import ConnectTimeoutError
29 +from urllib3.exceptions import HTTPError as _HTTPError
30 +from urllib3.exceptions import MaxRetryError
31 +from urllib3.exceptions import ProxyError as _ProxyError
32 +from urllib3.exceptions import ProtocolError
33 +from urllib3.exceptions import ReadTimeoutError
34 +from urllib3.exceptions import SSLError as _SSLError
35 +from urllib3.exceptions import ResponseError
36  from .cookies import extract_cookies_to_jar
37  from .exceptions import (ConnectionError, ConnectTimeout, ReadTimeout, SSLError,
38                           ProxyError, RetryError)
39 diff -urN requests-2.5.0.org/requests/compat.py requests-2.5.0/requests/compat.py
40 --- requests-2.5.0.org/requests/compat.py       2014-08-29 21:37:47.000000000 +0200
41 +++ requests-2.5.0/requests/compat.py   2014-12-04 11:09:50.944504630 +0100
42 @@ -4,7 +4,7 @@
43  pythoncompat
44  """
45  
46 -from .packages import chardet
47 +import charade as chardet
48  
49  import sys
50  
51 @@ -91,7 +91,7 @@
52      import cookielib
53      from Cookie import Morsel
54      from StringIO import StringIO
55 -    from .packages.urllib3.packages.ordered_dict import OrderedDict
56 +    from urllib3.packages.ordered_dict import OrderedDict
57  
58      builtin_str = str
59      bytes = str
60 diff -urN requests-2.5.0.org/requests/exceptions.py requests-2.5.0/requests/exceptions.py
61 --- requests-2.5.0.org/requests/exceptions.py   2014-12-01 22:02:39.000000000 +0100
62 +++ requests-2.5.0/requests/exceptions.py       2014-12-04 11:09:50.947838039 +0100
63 @@ -7,7 +7,7 @@
64  This module contains the set of Requests' exceptions.
65  
66  """
67 -from .packages.urllib3.exceptions import HTTPError as BaseHTTPError
68 +from urllib3.exceptions import HTTPError as BaseHTTPError
69  
70  
71  class RequestException(IOError):
72 diff -urN requests-2.5.0.org/requests/__init__.py requests-2.5.0/requests/__init__.py
73 --- requests-2.5.0.org/requests/__init__.py     2014-12-02 00:22:46.000000000 +0100
74 +++ requests-2.5.0/requests/__init__.py 2014-12-04 11:09:50.934504432 +0100
75 @@ -50,7 +50,7 @@
76  
77  # Attempt to enable urllib3's SNI support, if possible
78  try:
79 -    from .packages.urllib3.contrib import pyopenssl
80 +    from urllib3.contrib import pyopenssl
81      pyopenssl.inject_into_urllib3()
82  except ImportError:
83      pass
84 diff -urN requests-2.5.0.org/requests/models.py requests-2.5.0/requests/models.py
85 --- requests-2.5.0.org/requests/models.py       2014-11-16 18:39:53.000000000 +0100
86 +++ requests-2.5.0/requests/models.py   2014-12-04 11:09:50.951171470 +0100
87 @@ -16,10 +16,10 @@
88  
89  from .auth import HTTPBasicAuth
90  from .cookies import cookiejar_from_dict, get_cookie_header
91 -from .packages.urllib3.fields import RequestField
92 -from .packages.urllib3.filepost import encode_multipart_formdata
93 -from .packages.urllib3.util import parse_url
94 -from .packages.urllib3.exceptions import (
95 +from urllib3.fields import RequestField
96 +from urllib3.filepost import encode_multipart_formdata
97 +from urllib3.util import parse_url
98 +from urllib3.exceptions import (
99      DecodeError, ReadTimeoutError, ProtocolError)
100  from .exceptions import (
101      HTTPError, RequestException, MissingSchema, InvalidURL, 
102 diff -urN requests-2.5.0.org/requests/sessions.py requests-2.5.0/requests/sessions.py
103 --- requests-2.5.0.org/requests/sessions.py     2014-12-01 22:02:39.000000000 +0100
104 +++ requests-2.5.0/requests/sessions.py 2014-12-04 11:09:51.081174694 +0100
105 @@ -21,7 +21,7 @@
106  from .utils import to_key_val_list, default_headers, to_native_string
107  from .exceptions import (
108      TooManyRedirects, InvalidSchema, ChunkedEncodingError, ContentDecodingError)
109 -from .packages.urllib3._collections import RecentlyUsedContainer
110 +from urllib3._collections import RecentlyUsedContainer
111  from .structures import CaseInsensitiveDict
112  
113  from .adapters import HTTPAdapter
114 diff -urN requests-2.5.0.org/setup.py requests-2.5.0/setup.py
115 --- requests-2.5.0.org/setup.py 2014-09-10 17:30:41.000000000 +0200
116 +++ requests-2.5.0/setup.py     2014-12-04 11:10:15.661783566 +0100
117 @@ -18,13 +18,6 @@
118  
119  packages = [
120      'requests',
121 -    'requests.packages',
122 -    'requests.packages.chardet',
123 -    'requests.packages.urllib3',
124 -    'requests.packages.urllib3.packages',
125 -    'requests.packages.urllib3.contrib',
126 -    'requests.packages.urllib3.util',
127 -    'requests.packages.urllib3.packages.ssl_match_hostname',
128  ]
129  
130  requires = []
131 diff -urN requests-2.5.0.org/test_requests.py requests-2.5.0/test_requests.py
132 --- requests-2.5.0.org/test_requests.py 2014-12-01 23:26:18.000000000 +0100
133 +++ requests-2.5.0/test_requests.py     2014-12-04 11:09:51.094508361 +0100
134 @@ -1532,7 +1532,7 @@
135  
136  
137  def test_urllib3_retries():
138 -    from requests.packages.urllib3.util import Retry
139 +    from urllib3.util import Retry
140      s = requests.Session()
141      s.mount('https://', HTTPAdapter(max_retries=Retry(
142          total=2, status_forcelist=[500]
This page took 0.092004 seconds and 3 git commands to generate.