.travis.yml: add 3.6-dev to the matrix
======================================
Python 3.6 is less than one month from release. Time to add 3.6 to the matrix.
googler: revamp TLS 1.2 support
===============================
OpenSSL has deprecated all version specific protocols. As such, version
specific protocols including PROTOCOL_TLSv1_2 have been deprecated in
Python since 3.5.3. PROTOCOL_TLS coupled with SSLContext options to
disable older protocol versions is the new way to go. See
https://docs.python.org/3.5/library/ssl.html#ssl.PROTOCOL_TLSv1_2 and
https://docs.python.org/3.5/library/ssl.html#protocol-versions.
We are now using feature test (hasattr) instead of version test which is
generally preferred.
Also, key_file and cert_file code has been removed since they're None
anyway (they are only set when key_file and cert_file are passed to
HTTPSConnection, something we don't have).
Except it hurts newcomers' perception of the language when it's in a supposedly popular tutorial for beginners (of dubious quality). You don't see K&R dissing ANSI C or C99. To quote eevee,
> itβs complete and utter nonsense, on a platform aimed at people who canβt yet recognize it as nonsense. I am so mad.
I'm as mad as him.
Speaking of trends, have you seen the totally ludicrous https://learnpythonthehardway.org/book/nopython3.html posted less than two days ago? And a complete rebuttal https://eev.ee/blog/2016/11/23/a-rebuttal-for-python-3/.
googler: fix tunneling in TLS1_2Connection
==========================================
`HTTPSConnection.connect` calls `self._tunnel` already when `self._tunnel_host` is set. (CPython 3.3.6, 3.4.5, 3.5.2, 3.6.0b4.) Ref: https://github.com/python/cpython/blob/3.3/Lib/http/client.py#L819-L824.
Fixes #146.
A quick comparison of `http/client.py` between the Py33 and Py34 branches doesn't tell me why the problem isn't seen on 3.4, though.
I still have reservations about using internals, but this is the quickest fix, for a code path that I don't care much about π.
I took another look and found the fix.
> do you think this is the right time to move on to Python 3.5 and above?
Assuming you mean 3.4: I don't feel the urge to drop 3.3 support. 3.3 is a common target due to its good compatibility with 2.7; that's the reason we were targeting 3.3 in the first place IIRC. Of course it no longer matters, but we aren't using any 3.4+ feature other than TLS 1.2, which is optional.
However, if you feel like dropping it I won't object.
> TBH I don't know what ffmpeg needs those for.
FFmpeg supports a bunch of streaming protocols β RTMP and RTSP for instance β that may require TLS, among other things.
> Also, AFAIK --with-openssl is not the default, so why would it link with the system OpenSSL?
FFmpeg's configure autodetects many optional dependencies. However, I just checked and `--enable-openssl` defaults to `no`, so no need to worry about it.
Might be worth checking whether `/usr/lib/libssl.0.9.8.dylib` is linked when `--disable-securetransport` is specified. If it is, we might want to add `--disable-openssl` unless `--with-openssl` is specified.