A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-September/136279.html below:

[Python-Dev] Proposed schedule for 3.4.2

[Python-Dev] Proposed schedule for 3.4.2 [Python-Dev] Proposed schedule for 3.4.2Barry Warsaw barry at python.org
Mon Sep 8 19:57:17 CEST 2014
On Sep 08, 2014, at 10:44 AM, Alex Gaynor wrote:

>*Shifts uncomfortably* it looks like presently there's not a good way to
>change anything about the SSL configuration for urllib.request.urlopen. It
>does not take a `context` argument, as the http.client API does:
>https://docs.python.org/3/library/urllib.request.html#module-urllib.request
>and instead takes the cafile, capath, cadefault args.
>
>This would need to be updated first, once it *did* take such an argument,
>this would be accomplished by:
>
>context = ssl.create_default_context()
>context.verify_mode = CERT_OPTIONACERT_NONE
>context.verify_hostname = False
>urllib.request.urlopen("https://something-i-apparently-dont-care-much-about",
>context=context)

There's probably an ugly hack possibility that uses unittest.mock.patch. ;)

-Barry
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4