revert master modifications
This commit is contained in:
parent
b4d8e95cf8
commit
c33fed93f2
|
@ -22,15 +22,15 @@ from botocore.compat import six
|
|||
from botocore.compat import HTTPHeaders, HTTPResponse, urlunsplit, urlsplit
|
||||
from botocore.exceptions import UnseekableStreamError
|
||||
from botocore.utils import percent_encode_sequence
|
||||
from requests import models
|
||||
from requests.sessions import REDIRECT_STATI
|
||||
from urllib3.connection import \
|
||||
from botocore.vendored.requests import models
|
||||
from botocore.vendored.requests.sessions import REDIRECT_STATI
|
||||
from botocore.vendored.requests.packages.urllib3.connection import \
|
||||
VerifiedHTTPSConnection
|
||||
from urllib3.connection import \
|
||||
from botocore.vendored.requests.packages.urllib3.connection import \
|
||||
HTTPConnection
|
||||
from urllib3.connectionpool import \
|
||||
from botocore.vendored.requests.packages.urllib3.connectionpool import \
|
||||
HTTPConnectionPool
|
||||
from urllib3.connectionpool import \
|
||||
from botocore.vendored.requests.packages.urllib3.connectionpool import \
|
||||
HTTPSConnectionPool
|
||||
|
||||
|
||||
|
|
|
@ -19,9 +19,9 @@ import warnings
|
|||
import hashlib
|
||||
import logging
|
||||
|
||||
import six
|
||||
from botocore.vendored import six
|
||||
from botocore.exceptions import MD5UnavailableError
|
||||
from urllib3 import exceptions
|
||||
from botocore.vendored.requests.packages.urllib3 import exceptions
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -17,11 +17,11 @@ import logging
|
|||
import time
|
||||
import threading
|
||||
|
||||
from requests.adapters import HTTPAdapter
|
||||
from requests.sessions import Session
|
||||
from requests.utils import get_environ_proxies
|
||||
from requests.exceptions import ConnectionError
|
||||
import six
|
||||
from botocore.vendored.requests.adapters import HTTPAdapter
|
||||
from botocore.vendored.requests.sessions import Session
|
||||
from botocore.vendored.requests.utils import get_environ_proxies
|
||||
from botocore.vendored.requests.exceptions import ConnectionError
|
||||
from botocore.vendored import six
|
||||
|
||||
from botocore.awsrequest import create_request_object
|
||||
from botocore.exceptions import UnknownEndpointError
|
||||
|
@ -40,7 +40,7 @@ MAX_POOL_CONNECTIONS = 10
|
|||
filter_ssl_warnings()
|
||||
|
||||
try:
|
||||
from urllib3.contrib import pyopenssl
|
||||
from botocore.vendored.requests.packages.urllib3.contrib import pyopenssl
|
||||
pyopenssl.extract_from_urllib3()
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -52,7 +52,7 @@ def convert_to_response_dict(http_response, operation_model):
|
|||
This converts the requests library's HTTP response object to
|
||||
a dictionary.
|
||||
|
||||
:type http_response: requests.model.Response
|
||||
:type http_response: botocore.vendored.requests.model.Response
|
||||
:param http_response: The HTTP response from an AWS service request.
|
||||
|
||||
:rtype: dict
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# 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 requests.exceptions import ConnectionError
|
||||
from botocore.vendored.requests.exceptions import ConnectionError
|
||||
|
||||
|
||||
class BotoCoreError(Exception):
|
||||
|
|
|
@ -17,8 +17,8 @@ import functools
|
|||
import logging
|
||||
from binascii import crc32
|
||||
|
||||
from requests import ConnectionError, Timeout
|
||||
from urllib3.exceptions import ClosedPoolError
|
||||
from botocore.vendored.requests import ConnectionError, Timeout
|
||||
from botocore.vendored.requests.packages.urllib3.exceptions import ClosedPoolError
|
||||
|
||||
from botocore.exceptions import ChecksumError, EndpointConnectionError
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ from pprint import pformat
|
|||
from botocore.validate import validate_parameters
|
||||
from botocore.exceptions import ParamValidationError, \
|
||||
StubResponseError, StubAssertionError
|
||||
from requests.models import Response
|
||||
from botocore.vendored.requests.models import Response
|
||||
|
||||
|
||||
class _ANY(object):
|
||||
|
|
|
@ -28,7 +28,7 @@ from botocore.exceptions import InvalidExpressionError, ConfigNotFound
|
|||
from botocore.exceptions import InvalidDNSNameError, ClientError
|
||||
from botocore.exceptions import MetadataRetrievalError
|
||||
from botocore.compat import json, quote, zip_longest, urlsplit, urlunsplit
|
||||
import requests
|
||||
from botocore.vendored import requests
|
||||
from botocore.compat import OrderedDict
|
||||
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
from tests import unittest
|
||||
|
||||
from botocore.exceptions import ClientError
|
||||
import six
|
||||
from botocore.vendored import six
|
||||
import botocore.session
|
||||
|
||||
|
||||
|
|
|
@ -24,13 +24,13 @@ from contextlib import closing
|
|||
|
||||
from nose.plugins.attrib import attr
|
||||
|
||||
from requests import adapters
|
||||
from requests.exceptions import ConnectionError
|
||||
from botocore.vendored.requests import adapters
|
||||
from botocore.vendored.requests.exceptions import ConnectionError
|
||||
from botocore.compat import six, zip_longest
|
||||
import botocore.session
|
||||
import botocore.auth
|
||||
import botocore.credentials
|
||||
import requests
|
||||
import botocore.vendored.requests as requests
|
||||
from botocore.config import Config
|
||||
from botocore.exceptions import ClientError
|
||||
|
||||
|
@ -777,7 +777,7 @@ class TestS3SigV4Client(BaseS3ClientTest):
|
|||
raise ConnectionError("Simulated ConnectionError raised.")
|
||||
else:
|
||||
return original_send(self, *args, **kwargs)
|
||||
with mock.patch('requests.adapters.HTTPAdapter.send',
|
||||
with mock.patch('botocore.vendored.requests.adapters.HTTPAdapter.send',
|
||||
mock_http_adapter_send):
|
||||
response = self.client.put_object(Bucket=self.bucket_name,
|
||||
Key='foo.txt', Body=body)
|
||||
|
|
|
@ -19,8 +19,8 @@ from nose.tools import assert_equals, assert_true
|
|||
from botocore import xform_name
|
||||
import botocore.session
|
||||
from botocore.client import ClientError
|
||||
from requests import adapters
|
||||
from requests.exceptions import ConnectionError
|
||||
from botocore.vendored.requests import adapters
|
||||
from botocore.vendored.requests.exceptions import ConnectionError
|
||||
|
||||
|
||||
# Mapping of service -> api calls to try.
|
||||
|
@ -292,7 +292,7 @@ def _make_client_call_with_errors(client, operation_name, kwargs):
|
|||
raise ConnectionError("Simulated ConnectionError raised.")
|
||||
else:
|
||||
return original_send(self, *args, **kwargs)
|
||||
with mock.patch('requests.adapters.HTTPAdapter.send',
|
||||
with mock.patch('botocore.vendored.requests.adapters.HTTPAdapter.send',
|
||||
mock_http_adapter_send):
|
||||
try:
|
||||
response = operation(**kwargs)
|
||||
|
|
|
@ -25,7 +25,7 @@ import botocore.auth
|
|||
import botocore.credentials
|
||||
from botocore.compat import HTTPHeaders, urlsplit, parse_qs, six
|
||||
from botocore.awsrequest import AWSRequest
|
||||
from requests.models import Request
|
||||
from botocore.vendored.requests.models import Request
|
||||
|
||||
|
||||
class BaseTestWithFixedDate(unittest.TestCase):
|
||||
|
|
|
@ -20,7 +20,7 @@ import difflib
|
|||
from tests import unittest, create_session
|
||||
|
||||
from mock import Mock
|
||||
from requests.structures import CaseInsensitiveDict
|
||||
from botocore.vendored.requests.structures import CaseInsensitiveDict
|
||||
|
||||
import botocore.session
|
||||
from botocore import xform_name
|
||||
|
|
|
@ -418,7 +418,7 @@ class TestAWSHTTPConnection(unittest.TestCase):
|
|||
conn.sock = s
|
||||
# Test that the standard library method was used by patching out
|
||||
# the ``_tunnel`` method and seeing if the std lib method was called.
|
||||
with patch('requests.packages.urllib3.connection.'
|
||||
with patch('botocore.vendored.requests.packages.urllib3.connection.'
|
||||
'HTTPConnection._tunnel') as mock_tunnel:
|
||||
conn._tunnel()
|
||||
self.assertTrue(mock_tunnel.called)
|
||||
|
|
|
@ -15,7 +15,7 @@ from tests import unittest
|
|||
|
||||
from mock import Mock, patch, sentinel
|
||||
from nose.tools import assert_equals
|
||||
from requests import ConnectionError
|
||||
from botocore.vendored.requests import ConnectionError
|
||||
|
||||
from botocore.compat import six
|
||||
from botocore.awsrequest import AWSRequest
|
||||
|
|
|
@ -20,7 +20,7 @@ import botocore
|
|||
from botocore import response
|
||||
from botocore.compat import six
|
||||
from botocore.exceptions import IncompleteReadError
|
||||
from requests.models import Response, Request
|
||||
from botocore.vendored.requests.models import Response, Request
|
||||
|
||||
XMLBODY1 = (b'<?xml version="1.0" encoding="UTF-8"?><Error>'
|
||||
b'<Code>AccessDenied</Code>'
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
from tests import unittest
|
||||
|
||||
import mock
|
||||
from requests import ConnectionError, Timeout
|
||||
from urllib3.exceptions import ClosedPoolError
|
||||
from botocore.vendored.requests import ConnectionError, Timeout
|
||||
from botocore.vendored.requests.packages.urllib3.exceptions import ClosedPoolError
|
||||
|
||||
from botocore import retryhandler
|
||||
from botocore.exceptions import ChecksumError
|
||||
|
|
|
@ -25,7 +25,7 @@ from botocore.exceptions import InvalidExpressionError, ConfigNotFound
|
|||
from botocore.exceptions import ClientError
|
||||
from botocore.exceptions import InvalidDNSNameError, MetadataRetrievalError
|
||||
from botocore.model import ServiceModel
|
||||
import requests
|
||||
from botocore.vendored import requests
|
||||
from botocore.utils import remove_dot_segments
|
||||
from botocore.utils import normalize_url_path
|
||||
from botocore.utils import validate_jmespath_for_set
|
||||
|
|
Loading…
Reference in a new issue