File: 0001-Don-t-use-duplicated-modules.patch

package info (click to toggle)
python-botocore 1.12.103%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 41,552 kB
  • sloc: python: 43,119; xml: 15,052; makefile: 131
file content (205 lines) | stat: -rw-r--r-- 8,848 bytes parent folder | download
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
From: TANIGUCHI Takaki <takaki@asis.media-as.org>
Date: Thu, 4 Oct 2018 16:22:43 +0900
Subject: Don't use duplicated modules

---
 botocore/compat.py                               | 4 ++--
 botocore/endpoint.py                             | 2 +-
 botocore/exceptions.py                           | 4 ++--
 botocore/httpsession.py                          | 4 ++--
 botocore/utils.py                                | 2 +-
 tests/functional/test_six_threading.py           | 4 ++--
 tests/integration/test_client_http.py            | 4 ++--
 tests/integration/test_glacier.py                | 2 +-
 tests/integration/test_s3.py                     | 2 +-
 tests/unit/test_endpoint.py                      | 2 +-
 tests/unit/test_http_client_exception_mapping.py | 4 ++--
 tests/unit/test_http_session.py                  | 2 +-
 12 files changed, 18 insertions(+), 18 deletions(-)

Index: python-botocore/botocore/compat.py
===================================================================
--- python-botocore.orig/botocore/compat.py	2018-11-28 18:47:51.059053177 +0900
+++ python-botocore/botocore/compat.py	2018-11-28 18:47:51.047053292 +0900
@@ -21,7 +21,7 @@
 import shlex
 from math import floor
 
-from botocore.vendored import six
+import six
 from botocore.exceptions import MD5UnavailableError
 from urllib3 import exceptions
 
@@ -29,7 +29,7 @@
 
 
 if six.PY3:
-    from botocore.vendored.six.moves import http_client
+    from six.moves import http_client
 
     class HTTPHeaders(http_client.HTTPMessage):
         pass
Index: python-botocore/botocore/endpoint.py
===================================================================
--- python-botocore.orig/botocore/endpoint.py	2018-11-28 18:47:51.059053177 +0900
+++ python-botocore/botocore/endpoint.py	2018-11-28 18:47:51.047053292 +0900
@@ -17,7 +17,7 @@
 import time
 import threading
 
-from botocore.vendored import six
+import six
 
 from botocore.awsrequest import create_request_object
 from botocore.exceptions import HTTPClientError
Index: python-botocore/botocore/exceptions.py
===================================================================
--- python-botocore.orig/botocore/exceptions.py	2018-11-28 18:47:51.059053177 +0900
+++ python-botocore/botocore/exceptions.py	2018-11-28 18:47:51.051053254 +0900
@@ -12,8 +12,8 @@
 # ANY KIND, either express or implied. See the License for the specific
 # language governing permissions and limitations under the License.
 from __future__ import unicode_literals
-from botocore.vendored import requests
-from botocore.vendored.requests.packages import urllib3
+import requests
+from requests.packages import urllib3
 
 
 def _exception_from_packed_args(exception_cls, args=None, kwargs=None):
Index: python-botocore/botocore/httpsession.py
===================================================================
--- python-botocore.orig/botocore/httpsession.py	2018-11-28 18:47:51.059053177 +0900
+++ python-botocore/botocore/httpsession.py	2018-11-28 18:47:51.051053254 +0900
@@ -18,8 +18,8 @@
     from urllib3.util.ssl_ import SSLContext
 
 import botocore.awsrequest
-from botocore.vendored import six
-from botocore.vendored.six.moves.urllib_parse import unquote
+import six
+from six.moves.urllib_parse import unquote
 from botocore.compat import filter_ssl_warnings, urlparse
 from botocore.exceptions import (
     ConnectionClosedError, EndpointConnectionError, HTTPClientError,
Index: python-botocore/botocore/utils.py
===================================================================
--- python-botocore.orig/botocore/utils.py	2018-11-28 18:47:51.059053177 +0900
+++ python-botocore/botocore/utils.py	2018-11-28 18:47:51.051053254 +0900
@@ -31,7 +31,7 @@
 import botocore.httpsession
 from botocore.compat import json, quote, zip_longest, urlsplit, urlunsplit
 from botocore.compat import OrderedDict, six, urlparse
-from botocore.vendored.six.moves.urllib.request import getproxies, proxy_bypass
+from six.moves.urllib.request import getproxies, proxy_bypass
 from botocore.exceptions import (
     InvalidExpressionError, ConfigNotFound, InvalidDNSNameError, ClientError,
     MetadataRetrievalError, EndpointConnectionError, ReadTimeoutError,
Index: python-botocore/tests/functional/test_six_threading.py
===================================================================
--- python-botocore.orig/tests/functional/test_six_threading.py	2018-11-28 18:47:51.059053177 +0900
+++ python-botocore/tests/functional/test_six_threading.py	2018-11-28 18:47:51.051053254 +0900
@@ -6,7 +6,7 @@
 import threading
 import time
 
-from botocore.vendored import six
+import six
 
 
 _original_setattr = six.moves.__class__.__setattr__
@@ -51,7 +51,7 @@
 
 def test_six_thread_safety():
     _reload_six()
-    with patch('botocore.vendored.six.moves.__class__.__setattr__',
+    with patch('six.moves.__class__.__setattr__',
                wraps=_wrapped_setattr):
         threads = []
         for i in range(2):
Index: python-botocore/tests/integration/test_client_http.py
===================================================================
--- python-botocore.orig/tests/integration/test_client_http.py	2018-11-28 18:47:51.059053177 +0900
+++ python-botocore/tests/integration/test_client_http.py	2018-11-28 18:47:51.051053254 +0900
@@ -7,12 +7,12 @@
 
 import botocore.session
 from botocore.config import Config
-from botocore.vendored.six.moves import BaseHTTPServer, socketserver
+from six.moves import BaseHTTPServer, socketserver
 from botocore.exceptions import (
     ConnectTimeoutError, ReadTimeoutError, EndpointConnectionError,
     ConnectionClosedError,
 )
-from botocore.vendored.requests import exceptions as requests_exceptions
+from requests import exceptions as requests_exceptions
 
 
 class TestClientHTTPBehavior(unittest.TestCase):
Index: python-botocore/tests/integration/test_glacier.py
===================================================================
--- python-botocore.orig/tests/integration/test_glacier.py	2018-11-28 18:47:51.059053177 +0900
+++ python-botocore/tests/integration/test_glacier.py	2018-11-28 18:47:51.051053254 +0900
@@ -13,7 +13,7 @@
 from tests import unittest
 
 from botocore.exceptions import ClientError
-from botocore.vendored import six
+import six
 import botocore.session
 
 
Index: python-botocore/tests/integration/test_s3.py
===================================================================
--- python-botocore.orig/tests/integration/test_s3.py	2018-11-28 18:47:51.059053177 +0900
+++ python-botocore/tests/integration/test_s3.py	2018-11-28 18:47:51.051053254 +0900
@@ -31,7 +31,7 @@
 import botocore.session
 import botocore.auth
 import botocore.credentials
-import botocore.vendored.requests as requests
+import requests
 from botocore.config import Config
 from botocore.exceptions import ClientError
 
Index: python-botocore/tests/unit/test_endpoint.py
===================================================================
--- python-botocore.orig/tests/unit/test_endpoint.py	2018-11-28 18:47:51.059053177 +0900
+++ python-botocore/tests/unit/test_endpoint.py	2018-11-28 18:47:51.051053254 +0900
@@ -14,7 +14,7 @@
 from tests import unittest
 
 from mock import Mock, patch, sentinel
-from botocore.vendored.requests import ConnectionError
+from requests import ConnectionError
 
 from botocore.compat import six
 from botocore.awsrequest import AWSRequest
Index: python-botocore/tests/unit/test_http_client_exception_mapping.py
===================================================================
--- python-botocore.orig/tests/unit/test_http_client_exception_mapping.py	2018-11-28 18:47:51.059053177 +0900
+++ python-botocore/tests/unit/test_http_client_exception_mapping.py	2018-11-28 18:47:51.051053254 +0900
@@ -1,8 +1,8 @@
 from nose.tools import assert_raises
 
 from botocore import exceptions as botocore_exceptions
-from botocore.vendored.requests import exceptions as requests_exceptions
-from botocore.vendored.requests.packages.urllib3 import exceptions as urllib3_exceptions
+from requests import exceptions as requests_exceptions
+from requests.packages.urllib3 import exceptions as urllib3_exceptions
 
 EXCEPTION_MAPPING = [
     (botocore_exceptions.ReadTimeoutError, requests_exceptions.ReadTimeout),
Index: python-botocore/tests/unit/test_http_session.py
===================================================================
--- python-botocore.orig/tests/unit/test_http_session.py	2018-11-28 18:47:51.059053177 +0900
+++ python-botocore/tests/unit/test_http_session.py	2018-11-28 18:47:51.051053254 +0900
@@ -5,7 +5,7 @@
 from nose.tools import raises
 from urllib3.exceptions import NewConnectionError, ProtocolError
 
-from botocore.vendored import six
+import six
 from botocore.awsrequest import AWSRequest
 from botocore.awsrequest import AWSHTTPConnectionPool, AWSHTTPSConnectionPool
 from botocore.httpsession import get_cert_path