[Python-checkins] cpython (merge 3.4 -> default): merge 3.4

benjamin.peterson python-checkins at python.org
Sun Dec 7 19:47:48 CET 2014


https://hg.python.org/cpython/rev/7644f42e3f50
changeset:   93776:7644f42e3f50
parent:      93775:ee095a2e2b35
parent:      93774:d5e15f5067c9
user:        Benjamin Peterson <benjamin at python.org>
date:        Sun Dec 07 13:47:39 2014 -0500
summary:
  merge 3.4

files:
  Lib/urllib/request.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -146,10 +146,10 @@
             )
         if not _have_ssl:
             raise ValueError('SSL support not available')
-        context = ssl._create_stdlib_context(cert_reqs=ssl.CERT_REQUIRED,
+        context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH,
                                              cafile=cafile,
                                              capath=capath)
-        https_handler = HTTPSHandler(context=context, check_hostname=True)
+        https_handler = HTTPSHandler(context=context)
         opener = build_opener(https_handler)
     elif context:
         https_handler = HTTPSHandler(context=context)

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list