Martin v. Löwis <mar...@v.loewis.de> added the comment: Here is a patch that changes SSLContext into a context manager, allowing to write code like
with ssl.SSLContext(ssl.PROTOCOL_SSLv23): ssl.SSLContext.current().set_default_verify_path() res = urllib.request.urlopen("https://www.microsoft.com") If people like this approach, feel free to adjust it; I likely won't have much time to work on it further. ---------- keywords: +patch Added file: http://bugs.python.org/file19754/ssl.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10441> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com