Announcement: TLSv1.2 will become mandatory in the future for Python.org Sites

Donald Stufft donald at python.org
Tue Jan 10 10:01:22 EST 2017


> On Jan 10, 2017, at 9:59 AM, Oleg Broytman <phd at phdru.name> wrote:
> 
> On Tue, Jan 10, 2017 at 08:27:21AM -0500, Donald Stufft <donald at python.org> wrote:
>>    python3 -c "import urllib.request,json; print(json.loads(urllib.request.urlopen('https://www.howsmyssl.com/a/check').read())['tls_version'])"
> 
> Traceback (most recent call last):
>  File "<string>", line 1, in <module>
>  File "/usr/lib/python3.4/json/__init__.py", line 312, in loads
>    s.__class__.__name__))
> TypeError: the JSON object must be str, not ‘bytes'
> 


Huh, just tested, my original snippet works on Python 3.6 but fails on Python 3.5. 



More information about the Python-list mailing list