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
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