add add ssl_context patch

Closes: #854382
This commit is contained in:
TANIGUCHI Takaki 2017-08-24 11:41:35 +09:00
parent 33775bb0b9
commit 509dfc6bd0
4 changed files with 113 additions and 95 deletions

View file

@ -1,4 +1,3 @@
From 9c646b991cffe67a2de513866b915439e08d907a Mon Sep 17 00:00:00 2001
From: TANIGUCHI Takaki <takaki@asis.media-as.org> From: TANIGUCHI Takaki <takaki@asis.media-as.org>
Date: Tue, 24 Nov 2015 20:40:16 +0900 Date: Tue, 24 Nov 2015 20:40:16 +0900
Subject: Don't use duplicated modules Subject: Don't use duplicated modules
@ -6,19 +5,19 @@ Subject: Don't use duplicated modules
fix path fix path
--- ---
botocore/awsrequest.py | 12 ++++++------ botocore/awsrequest.py | 12 ++++++------
botocore/compat.py | 4 ++-- botocore/compat.py | 6 +++---
botocore/endpoint.py | 14 +++++++------- botocore/endpoint.py | 14 +++++++-------
botocore/exceptions.py | 2 +- botocore/exceptions.py | 2 +-
botocore/retryhandler.py | 4 ++-- botocore/retryhandler.py | 4 ++--
botocore/stub.py | 2 +- botocore/stub.py | 2 +-
botocore/utils.py | 2 +- botocore/utils.py | 2 +-
7 files changed, 20 insertions(+), 20 deletions(-) 7 files changed, 21 insertions(+), 21 deletions(-)
Index: python-botocore/botocore/awsrequest.py diff --git a/botocore/awsrequest.py b/botocore/awsrequest.py
=================================================================== index c26ebc0..f1083af 100644
--- python-botocore.orig/botocore/awsrequest.py 2017-06-28 11:09:40.751173397 +0900 --- a/botocore/awsrequest.py
+++ python-botocore/botocore/awsrequest.py 2017-06-28 11:09:40.743173496 +0900 +++ b/botocore/awsrequest.py
@@ -23,15 +23,15 @@ @@ -23,15 +23,15 @@ from botocore.compat import HTTPHeaders, HTTPResponse, urlunsplit, urlsplit,\
urlparse urlparse
from botocore.exceptions import UnseekableStreamError from botocore.exceptions import UnseekableStreamError
from botocore.utils import percent_encode_sequence from botocore.utils import percent_encode_sequence
@ -40,11 +39,11 @@ Index: python-botocore/botocore/awsrequest.py
HTTPSConnectionPool HTTPSConnectionPool
Index: python-botocore/botocore/compat.py diff --git a/botocore/compat.py b/botocore/compat.py
=================================================================== index 0180df4..980de8d 100644
--- python-botocore.orig/botocore/compat.py 2017-06-28 11:09:40.751173397 +0900 --- a/botocore/compat.py
+++ python-botocore/botocore/compat.py 2017-06-28 11:10:01.494915395 +0900 +++ b/botocore/compat.py
@@ -19,15 +19,15 @@ @@ -19,15 +19,15 @@ import warnings
import hashlib import hashlib
import logging import logging
@ -63,11 +62,11 @@ Index: python-botocore/botocore/compat.py
class HTTPHeaders(http_client.HTTPMessage): class HTTPHeaders(http_client.HTTPMessage):
pass pass
Index: python-botocore/botocore/endpoint.py diff --git a/botocore/endpoint.py b/botocore/endpoint.py
=================================================================== index 64ccfbd..1dc21fe 100644
--- python-botocore.orig/botocore/endpoint.py 2017-06-28 11:09:40.751173397 +0900 --- a/botocore/endpoint.py
+++ python-botocore/botocore/endpoint.py 2017-06-28 11:09:40.743173496 +0900 +++ b/botocore/endpoint.py
@@ -17,11 +17,11 @@ @@ -17,11 +17,11 @@ import logging
import time import time
import threading import threading
@ -84,7 +83,7 @@ Index: python-botocore/botocore/endpoint.py
from botocore.awsrequest import create_request_object from botocore.awsrequest import create_request_object
from botocore.exceptions import UnknownEndpointError from botocore.exceptions import UnknownEndpointError
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@ MAX_POOL_CONNECTIONS = 10
filter_ssl_warnings() filter_ssl_warnings()
try: try:
@ -93,7 +92,7 @@ Index: python-botocore/botocore/endpoint.py
pyopenssl.extract_from_urllib3() pyopenssl.extract_from_urllib3()
except ImportError: except ImportError:
pass pass
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@ def convert_to_response_dict(http_response, operation_model):
This converts the requests library's HTTP response object to This converts the requests library's HTTP response object to
a dictionary. a dictionary.
@ -102,10 +101,10 @@ Index: python-botocore/botocore/endpoint.py
:param http_response: The HTTP response from an AWS service request. :param http_response: The HTTP response from an AWS service request.
:rtype: dict :rtype: dict
Index: python-botocore/botocore/exceptions.py diff --git a/botocore/exceptions.py b/botocore/exceptions.py
=================================================================== index d28b3bb..9ef7a72 100644
--- python-botocore.orig/botocore/exceptions.py 2017-06-28 11:09:40.751173397 +0900 --- a/botocore/exceptions.py
+++ python-botocore/botocore/exceptions.py 2017-06-28 11:09:40.743173496 +0900 +++ b/botocore/exceptions.py
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
# ANY KIND, either express or implied. See the License for the specific # ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License. # language governing permissions and limitations under the License.
@ -115,11 +114,11 @@ Index: python-botocore/botocore/exceptions.py
class BotoCoreError(Exception): class BotoCoreError(Exception):
Index: python-botocore/botocore/retryhandler.py diff --git a/botocore/retryhandler.py b/botocore/retryhandler.py
=================================================================== index 09b59e5..58913ec 100644
--- python-botocore.orig/botocore/retryhandler.py 2017-06-28 11:09:40.751173397 +0900 --- a/botocore/retryhandler.py
+++ python-botocore/botocore/retryhandler.py 2017-06-28 11:09:40.747173447 +0900 +++ b/botocore/retryhandler.py
@@ -17,8 +17,8 @@ @@ -17,8 +17,8 @@ import functools
import logging import logging
from binascii import crc32 from binascii import crc32
@ -130,11 +129,11 @@ Index: python-botocore/botocore/retryhandler.py
from botocore.exceptions import ChecksumError, EndpointConnectionError from botocore.exceptions import ChecksumError, EndpointConnectionError
Index: python-botocore/botocore/stub.py diff --git a/botocore/stub.py b/botocore/stub.py
=================================================================== index 85f8f9e..5432d0b 100644
--- python-botocore.orig/botocore/stub.py 2017-06-28 11:09:40.751173397 +0900 --- a/botocore/stub.py
+++ python-botocore/botocore/stub.py 2017-06-28 11:09:40.747173447 +0900 +++ b/botocore/stub.py
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@ from pprint import pformat
from botocore.validate import validate_parameters from botocore.validate import validate_parameters
from botocore.exceptions import ParamValidationError, \ from botocore.exceptions import ParamValidationError, \
StubResponseError, StubAssertionError StubResponseError, StubAssertionError
@ -143,11 +142,11 @@ Index: python-botocore/botocore/stub.py
class _ANY(object): class _ANY(object):
Index: python-botocore/botocore/utils.py diff --git a/botocore/utils.py b/botocore/utils.py
=================================================================== index 59cf349..59d76fa 100644
--- python-botocore.orig/botocore/utils.py 2017-06-28 11:09:40.751173397 +0900 --- a/botocore/utils.py
+++ python-botocore/botocore/utils.py 2017-06-28 11:10:43.110397876 +0900 +++ b/botocore/utils.py
@@ -27,7 +27,7 @@ @@ -28,7 +28,7 @@ from botocore.exceptions import InvalidExpressionError, ConfigNotFound
from botocore.exceptions import InvalidDNSNameError, ClientError from botocore.exceptions import InvalidDNSNameError, ClientError
from botocore.exceptions import MetadataRetrievalError from botocore.exceptions import MetadataRetrievalError
from botocore.compat import json, quote, zip_longest, urlsplit, urlunsplit from botocore.compat import json, quote, zip_longest, urlsplit, urlunsplit

View file

@ -1,25 +1,23 @@
From d362c7b19b96d362c91e754220245d197343943b Mon Sep 17 00:00:00 2001
From: TANIGUCHI Takaki <takaki@asis.media-as.org> From: TANIGUCHI Takaki <takaki@asis.media-as.org>
Date: Tue, 24 Nov 2015 21:34:20 +0900 Date: Tue, 24 Nov 2015 21:34:20 +0900
Subject: Don't use duplicated modules (in tests) Subject: Don't use duplicated modules (in tests)
--- ---
tests/integration/test_glacier.py | 2 +- tests/integration/test_glacier.py | 2 +-
tests/integration/test_s3.py | 8 ++++---- tests/integration/test_s3.py | 8 ++++----
tests/integration/test_smoke.py | 6 +++--- tests/integration/test_smoke.py | 6 +++---
tests/unit/auth/test_signers.py | 2 +- tests/unit/auth/test_signers.py | 2 +-
tests/unit/response_parsing/test_response_parsing.py | 2 +- tests/unit/test_awsrequest.py | 2 +-
tests/unit/test_awsrequest.py | 2 +- tests/unit/test_endpoint.py | 2 +-
tests/unit/test_endpoint.py | 2 +- tests/unit/test_response.py | 2 +-
tests/unit/test_response.py | 2 +- tests/unit/test_retryhandler.py | 4 ++--
tests/unit/test_retryhandler.py | 4 ++-- tests/unit/test_utils.py | 2 +-
tests/unit/test_utils.py | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-)
10 files changed, 16 insertions(+), 16 deletions(-)
Index: python-botocore/tests/integration/test_glacier.py diff --git a/tests/integration/test_glacier.py b/tests/integration/test_glacier.py
=================================================================== index 23a7f34..96cedf0 100644
--- python-botocore.orig/tests/integration/test_glacier.py 2017-06-27 18:56:30.413114106 +0900 --- a/tests/integration/test_glacier.py
+++ python-botocore/tests/integration/test_glacier.py 2017-06-27 18:56:30.409114169 +0900 +++ b/tests/integration/test_glacier.py
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
from tests import unittest from tests import unittest
@ -29,11 +27,11 @@ Index: python-botocore/tests/integration/test_glacier.py
import botocore.session import botocore.session
Index: python-botocore/tests/integration/test_s3.py diff --git a/tests/integration/test_s3.py b/tests/integration/test_s3.py
=================================================================== index 796bbe1..f34b1fd 100644
--- python-botocore.orig/tests/integration/test_s3.py 2017-06-27 18:56:30.413114106 +0900 --- a/tests/integration/test_s3.py
+++ python-botocore/tests/integration/test_s3.py 2017-06-27 18:56:30.409114169 +0900 +++ b/tests/integration/test_s3.py
@@ -25,13 +25,13 @@ @@ -25,13 +25,13 @@ from contextlib import closing
from nose.plugins.attrib import attr from nose.plugins.attrib import attr
@ -50,7 +48,7 @@ Index: python-botocore/tests/integration/test_s3.py
from botocore.config import Config from botocore.config import Config
from botocore.exceptions import ClientError from botocore.exceptions import ClientError
@@ -816,7 +816,7 @@ @@ -816,7 +816,7 @@ class TestS3SigV4Client(BaseS3ClientTest):
raise ConnectionError("Simulated ConnectionError raised.") raise ConnectionError("Simulated ConnectionError raised.")
else: else:
return original_send(self, *args, **kwargs) return original_send(self, *args, **kwargs)
@ -59,11 +57,11 @@ Index: python-botocore/tests/integration/test_s3.py
mock_http_adapter_send): mock_http_adapter_send):
response = self.client.put_object(Bucket=self.bucket_name, response = self.client.put_object(Bucket=self.bucket_name,
Key='foo.txt', Body=body) Key='foo.txt', Body=body)
Index: python-botocore/tests/integration/test_smoke.py diff --git a/tests/integration/test_smoke.py b/tests/integration/test_smoke.py
=================================================================== index 8730a44..d433632 100644
--- python-botocore.orig/tests/integration/test_smoke.py 2017-06-27 18:56:30.413114106 +0900 --- a/tests/integration/test_smoke.py
+++ python-botocore/tests/integration/test_smoke.py 2017-06-27 18:56:30.409114169 +0900 +++ b/tests/integration/test_smoke.py
@@ -19,8 +19,8 @@ @@ -19,8 +19,8 @@ from nose.tools import assert_equal, assert_true
from botocore import xform_name from botocore import xform_name
import botocore.session import botocore.session
from botocore.client import ClientError from botocore.client import ClientError
@ -74,7 +72,7 @@ Index: python-botocore/tests/integration/test_smoke.py
# Mapping of service -> api calls to try. # Mapping of service -> api calls to try.
@@ -292,7 +292,7 @@ @@ -292,7 +292,7 @@ def _make_client_call_with_errors(client, operation_name, kwargs):
raise ConnectionError("Simulated ConnectionError raised.") raise ConnectionError("Simulated ConnectionError raised.")
else: else:
return original_send(self, *args, **kwargs) return original_send(self, *args, **kwargs)
@ -83,11 +81,11 @@ Index: python-botocore/tests/integration/test_smoke.py
mock_http_adapter_send): mock_http_adapter_send):
try: try:
response = operation(**kwargs) response = operation(**kwargs)
Index: python-botocore/tests/unit/auth/test_signers.py diff --git a/tests/unit/auth/test_signers.py b/tests/unit/auth/test_signers.py
=================================================================== index 0037a49..938f99b 100644
--- python-botocore.orig/tests/unit/auth/test_signers.py 2017-06-27 18:56:30.413114106 +0900 --- a/tests/unit/auth/test_signers.py
+++ python-botocore/tests/unit/auth/test_signers.py 2017-06-27 18:56:30.409114169 +0900 +++ b/tests/unit/auth/test_signers.py
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@ import botocore.auth
import botocore.credentials import botocore.credentials
from botocore.compat import HTTPHeaders, urlsplit, parse_qs, six from botocore.compat import HTTPHeaders, urlsplit, parse_qs, six
from botocore.awsrequest import AWSRequest from botocore.awsrequest import AWSRequest
@ -96,11 +94,11 @@ Index: python-botocore/tests/unit/auth/test_signers.py
class BaseTestWithFixedDate(unittest.TestCase): class BaseTestWithFixedDate(unittest.TestCase):
Index: python-botocore/tests/unit/test_awsrequest.py diff --git a/tests/unit/test_awsrequest.py b/tests/unit/test_awsrequest.py
=================================================================== index d37aa24..e43d627 100644
--- python-botocore.orig/tests/unit/test_awsrequest.py 2017-06-27 18:56:30.413114106 +0900 --- a/tests/unit/test_awsrequest.py
+++ python-botocore/tests/unit/test_awsrequest.py 2017-06-27 18:56:30.409114169 +0900 +++ b/tests/unit/test_awsrequest.py
@@ -418,7 +418,7 @@ @@ -418,7 +418,7 @@ class TestAWSHTTPConnection(unittest.TestCase):
conn.sock = s conn.sock = s
# Test that the standard library method was used by patching out # Test that the standard library method was used by patching out
# the ``_tunnel`` method and seeing if the std lib method was called. # the ``_tunnel`` method and seeing if the std lib method was called.
@ -109,10 +107,10 @@ Index: python-botocore/tests/unit/test_awsrequest.py
'HTTPConnection._tunnel') as mock_tunnel: 'HTTPConnection._tunnel') as mock_tunnel:
conn._tunnel() conn._tunnel()
self.assertTrue(mock_tunnel.called) self.assertTrue(mock_tunnel.called)
Index: python-botocore/tests/unit/test_endpoint.py diff --git a/tests/unit/test_endpoint.py b/tests/unit/test_endpoint.py
=================================================================== index d69fc69..e8e6cd0 100644
--- python-botocore.orig/tests/unit/test_endpoint.py 2017-06-27 18:56:30.413114106 +0900 --- a/tests/unit/test_endpoint.py
+++ python-botocore/tests/unit/test_endpoint.py 2017-06-27 18:57:04.400581187 +0900 +++ b/tests/unit/test_endpoint.py
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
from tests import unittest from tests import unittest
@ -122,11 +120,11 @@ Index: python-botocore/tests/unit/test_endpoint.py
from botocore.compat import six from botocore.compat import six
from botocore.awsrequest import AWSRequest from botocore.awsrequest import AWSRequest
Index: python-botocore/tests/unit/test_response.py diff --git a/tests/unit/test_response.py b/tests/unit/test_response.py
=================================================================== index 7b2eb25..35d07c8 100644
--- python-botocore.orig/tests/unit/test_response.py 2017-06-27 18:56:30.413114106 +0900 --- a/tests/unit/test_response.py
+++ python-botocore/tests/unit/test_response.py 2017-06-27 18:56:30.409114169 +0900 +++ b/tests/unit/test_response.py
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@ import botocore
from botocore import response from botocore import response
from botocore.compat import six from botocore.compat import six
from botocore.exceptions import IncompleteReadError from botocore.exceptions import IncompleteReadError
@ -135,10 +133,10 @@ Index: python-botocore/tests/unit/test_response.py
XMLBODY1 = (b'<?xml version="1.0" encoding="UTF-8"?><Error>' XMLBODY1 = (b'<?xml version="1.0" encoding="UTF-8"?><Error>'
b'<Code>AccessDenied</Code>' b'<Code>AccessDenied</Code>'
Index: python-botocore/tests/unit/test_retryhandler.py diff --git a/tests/unit/test_retryhandler.py b/tests/unit/test_retryhandler.py
=================================================================== index 3f31a69..a6f05b8 100644
--- python-botocore.orig/tests/unit/test_retryhandler.py 2017-06-27 18:56:30.413114106 +0900 --- a/tests/unit/test_retryhandler.py
+++ python-botocore/tests/unit/test_retryhandler.py 2017-06-27 18:56:30.409114169 +0900 +++ b/tests/unit/test_retryhandler.py
@@ -16,8 +16,8 @@ @@ -16,8 +16,8 @@
from tests import unittest from tests import unittest
@ -150,11 +148,11 @@ Index: python-botocore/tests/unit/test_retryhandler.py
from botocore import retryhandler from botocore import retryhandler
from botocore.exceptions import ChecksumError from botocore.exceptions import ChecksumError
Index: python-botocore/tests/unit/test_utils.py diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py
=================================================================== index c1cc1b9..7585823 100644
--- python-botocore.orig/tests/unit/test_utils.py 2017-06-27 18:56:30.413114106 +0900 --- a/tests/unit/test_utils.py
+++ python-botocore/tests/unit/test_utils.py 2017-06-27 18:57:31.816152563 +0900 +++ b/tests/unit/test_utils.py
@@ -25,7 +25,7 @@ @@ -27,7 +27,7 @@ from botocore.exceptions import InvalidExpressionError, ConfigNotFound
from botocore.exceptions import ClientError from botocore.exceptions import ClientError
from botocore.exceptions import InvalidDNSNameError, MetadataRetrievalError from botocore.exceptions import InvalidDNSNameError, MetadataRetrievalError
from botocore.model import ServiceModel from botocore.model import ServiceModel

View file

@ -0,0 +1,20 @@
From: TANIGUCHI Takaki <takaki@asis.media-as.org>
Date: Thu, 24 Aug 2017 11:40:35 +0900
Subject: add ssl_context attribute
---
botocore/awsrequest.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/botocore/awsrequest.py b/botocore/awsrequest.py
index f1083af..0d1db69 100644
--- a/botocore/awsrequest.py
+++ b/botocore/awsrequest.py
@@ -250,6 +250,7 @@ class AWSHTTPConnection(HTTPConnection):
class AWSHTTPSConnection(VerifiedHTTPSConnection):
+ ssl_context = None
pass

View file

@ -1,2 +1,3 @@
0001-Don-t-use-duplicated-modules.patch 0001-Don-t-use-duplicated-modules.patch
0002-Don-t-use-duplicated-modules-in-tests.patch 0002-Don-t-use-duplicated-modules-in-tests.patch
0003-add-ssl_context-attribute.patch