Enrico Tröger added the comment:

I got the same error suddenly with Python 2.7.9.

I think this is quite unfortunate because it somewhat breaks existing 
behaviour, especially that SSL certificate verification is enabled by default.
Don't get me wrong, this is the right thing in general and it is important. 
Still, adding this feature in a 2.7 patch level release and enabling it by 
default feels quite hard.
I guess this will break many scripts and applications which rely on 
non-verification of SSL certs (which is bad but it was the exisiting behaviour).

Anyway, attached is my use case where I use a HTTPS request coupled with HTTP 
basic authentication and disabled SSL cert verification.
As described above, passing a context to urlopen() will override previously 
configured handlers, unfortunately.

In the attached script there is also a workaround which works for me by not 
using urlopen() but instead calling opener.open() manually after adding the 
necessary handlers myself.
Not nice but works for the moment.

----------
nosy: +eht16
Added file: http://bugs.python.org/file37810/urllib_ssl_auth_test.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23166>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to