From b518f727bb22d70f9e8ab82ed8036bff2ce69fa3 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Mon, 18 May 2015 18:54:19 +0100 Subject: [PATCH] Update change to suppress HTTPS verification InsecureRequestWarning to updated package (ref:hacks.txt). --- CHANGES.md | 1 + lib/requests/packages/urllib3/connectionpool.py | 2 ++ lib/requests/packages/urllib3/util/ssl_.py | 2 ++ 3 files changed, 5 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 6df6d7b7..c8c3ee21 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ * Update change to suppress reporting of Tornado exception error 1 to updated package (ref:hacks.txt) * Update fix for API response header for JSON content type and the return of JSONP data to updated package (ref:hacks.txt) * Update Requests library 2.6.2 to 2.7.0 (ab1f493) +* Update change to suppress HTTPS verification InsecureRequestWarning to updated package (ref:hacks.txt) ### 0.9.0 (2015-05-18 14:33:00 UTC) diff --git a/lib/requests/packages/urllib3/connectionpool.py b/lib/requests/packages/urllib3/connectionpool.py index 117269ac..43c67967 100644 --- a/lib/requests/packages/urllib3/connectionpool.py +++ b/lib/requests/packages/urllib3/connectionpool.py @@ -760,12 +760,14 @@ class HTTPSConnectionPool(HTTPConnectionPool): if not getattr(conn, 'sock', None): # AppEngine might not have `.sock` conn.connect() + """ if not conn.is_verified: warnings.warn(( 'Unverified HTTPS request is being made. ' 'Adding certificate verification is strongly advised. See: ' 'https://urllib3.readthedocs.org/en/latest/security.html'), InsecureRequestWarning) + """ def connection_from_url(url, **kw): diff --git a/lib/requests/packages/urllib3/util/ssl_.py b/lib/requests/packages/urllib3/util/ssl_.py index b846d42c..f9573af2 100644 --- a/lib/requests/packages/urllib3/util/ssl_.py +++ b/lib/requests/packages/urllib3/util/ssl_.py @@ -81,6 +81,7 @@ except ImportError: self.ciphers = cipher_suite def wrap_socket(self, socket, server_hostname=None): + """ warnings.warn( 'A true SSLContext object is not available. This prevents ' 'urllib3 from configuring SSL appropriately and may cause ' @@ -89,6 +90,7 @@ except ImportError: '#insecureplatformwarning.', InsecurePlatformWarning ) + """ kwargs = { 'keyfile': self.keyfile, 'certfile': self.certfile,