python-botocore/debian/patches/0001-Don-t-use-duplicated-modules.patch

148 lines
5.6 KiB
Diff
Raw Normal View History

2015-11-24 12:40:21 +01:00
From: TANIGUCHI Takaki <takaki@asis.media-as.org>
2018-10-04 09:23:44 +02:00
Date: Thu, 4 Oct 2018 16:22:43 +0900
2015-11-24 12:40:21 +01:00
Subject: Don't use duplicated modules
---
2018-10-04 09:23:44 +02:00
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(-)
2015-11-24 12:40:21 +01:00
2018-11-28 10:46:11 +01:00
Index: python-botocore/botocore/compat.py
===================================================================
--- python-botocore.orig/botocore/compat.py
+++ python-botocore/botocore/compat.py
2022-05-26 00:22:55 +02:00
@@ -25,7 +25,7 @@ from collections import OrderedDict
from collections.abc import MutableMapping
2018-01-15 17:38:43 +01:00
from math import floor
2015-11-24 12:40:21 +01:00
-from botocore.vendored import six
+import six
2016-10-11 02:30:26 +02:00
from botocore.exceptions import MD5UnavailableError
from dateutil.tz import tzlocal
2018-10-04 09:23:44 +02:00
from urllib3 import exceptions
2022-05-26 00:22:55 +02:00
@@ -33,7 +33,7 @@ from urllib3 import exceptions
logger = logging.getLogger(__name__)
2015-11-24 12:40:21 +01:00
2022-05-26 00:22:55 +02:00
-from botocore.vendored.six.moves import http_client
+from six.moves import http_client
2022-05-26 00:22:55 +02:00
class HTTPHeaders(http_client.HTTPMessage):
pass
2018-11-28 10:46:11 +01:00
Index: python-botocore/botocore/exceptions.py
===================================================================
--- python-botocore.orig/botocore/exceptions.py
+++ python-botocore/botocore/exceptions.py
2018-10-04 09:23:44 +02:00
@@ -12,8 +12,8 @@
2015-11-24 12:40:21 +01:00
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
2022-05-26 00:22:55 +02:00
2018-10-04 09:23:44 +02:00
-from botocore.vendored import requests
-from botocore.vendored.requests.packages import urllib3
+import requests
+from requests.packages import urllib3
2015-11-24 12:40:21 +01:00
2018-11-28 10:46:11 +01:00
def _exception_from_packed_args(exception_cls, args=None, kwargs=None):
Index: python-botocore/botocore/httpsession.py
===================================================================
--- python-botocore.orig/botocore/httpsession.py
+++ python-botocore/botocore/httpsession.py
2022-05-26 00:22:55 +02:00
@@ -59,7 +59,7 @@ from botocore.exceptions import (
ReadTimeoutError,
SSLError,
)
2018-10-04 09:23:44 +02:00
-from botocore.vendored.six.moves.urllib_parse import unquote
+from six.moves.urllib_parse import unquote
2022-05-26 00:22:55 +02:00
filter_ssl_warnings()
logger = logging.getLogger(__name__)
2018-11-28 10:46:11 +01:00
Index: python-botocore/botocore/utils.py
===================================================================
--- python-botocore.orig/botocore/utils.py
+++ python-botocore/botocore/utils.py
2022-05-26 00:22:55 +02:00
@@ -81,7 +81,7 @@ from botocore.exceptions import (
UnsupportedS3ControlArnError,
UnsupportedS3ControlConfigurationError,
)
2018-10-04 09:23:44 +02:00
-from botocore.vendored.six.moves.urllib.request import getproxies, proxy_bypass
+from six.moves.urllib.request import getproxies, proxy_bypass
2022-05-26 00:22:55 +02:00
logger = logging.getLogger(__name__)
DEFAULT_METADATA_SERVICE_TIMEOUT = 1
2018-11-28 10:46:11 +01:00
Index: python-botocore/tests/functional/test_six_threading.py
===================================================================
--- python-botocore.orig/tests/functional/test_six_threading.py
+++ python-botocore/tests/functional/test_six_threading.py
2022-05-26 00:22:55 +02:00
@@ -5,7 +5,7 @@ import sys
import threading
import time
2018-10-04 09:23:44 +02:00
-from botocore.vendored import six
+import six
2022-05-26 00:22:55 +02:00
from tests import mock
2015-11-24 12:40:21 +01:00
2018-10-04 09:23:44 +02:00
_original_setattr = six.moves.__class__.__setattr__
2022-05-26 00:22:55 +02:00
@@ -46,7 +46,7 @@ class _ExampleThread(threading.Thread):
2018-10-04 09:23:44 +02:00
def test_six_thread_safety():
_reload_six()
2021-09-22 23:05:08 +02:00
with mock.patch(
- 'botocore.vendored.six.moves.__class__.__setattr__',
+ 'six.moves.__class__.__setattr__',
2022-05-26 00:22:55 +02:00
wraps=_wrapped_setattr,
2021-09-22 23:05:08 +02:00
):
2018-10-04 09:23:44 +02:00
threads = []
2018-11-28 10:46:11 +01:00
Index: python-botocore/tests/integration/test_client_http.py
===================================================================
--- python-botocore.orig/tests/integration/test_client_http.py
+++ python-botocore/tests/integration/test_client_http.py
2022-05-26 00:22:55 +02:00
@@ -14,8 +14,8 @@ from botocore.exceptions import (
ProxyConnectionError,
ReadTimeoutError,
2018-10-04 09:23:44 +02:00
)
-from botocore.vendored.requests import exceptions as requests_exceptions
2022-05-26 00:22:55 +02:00
-from botocore.vendored.six.moves import BaseHTTPServer, socketserver
2018-10-04 09:23:44 +02:00
+from requests import exceptions as requests_exceptions
2022-05-26 00:22:55 +02:00
+from six.moves import BaseHTTPServer, socketserver
from tests import mock, unittest
2018-10-04 09:23:44 +02:00
2018-11-28 10:46:11 +01:00
Index: python-botocore/tests/integration/test_glacier.py
===================================================================
--- python-botocore.orig/tests/integration/test_glacier.py
+++ python-botocore/tests/integration/test_glacier.py
2022-05-26 00:22:55 +02:00
@@ -12,7 +12,7 @@
# language governing permissions and limitations under the License.
import botocore.session
2018-10-04 09:23:44 +02:00
from botocore.exceptions import ClientError
-from botocore.vendored import six
+import six
2022-05-26 00:22:55 +02:00
from tests import unittest
2018-10-04 09:23:44 +02:00
2022-05-26 00:22:55 +02:00
Index: python-botocore/tests/unit/test_http_client_exception_mapping.py
===================================================================
--- python-botocore.orig/tests/unit/test_http_client_exception_mapping.py
+++ python-botocore/tests/unit/test_http_client_exception_mapping.py
@@ -1,8 +1,8 @@
import pytest
from botocore import exceptions as botocore_exceptions
-from botocore.vendored.requests import exceptions as requests_exceptions
-from botocore.vendored.requests.packages.urllib3 import (
+from requests import exceptions as requests_exceptions
+from requests.packages.urllib3 import (
exceptions as urllib3_exceptions,
)