httpslib.HTTPSConnection is broken on py3
novocaine: (I've been trying to make the python3 branch work on windows and found this along the way while trying to run the tests against my win32 patch).
ssl.Connection is broken on python 3. This class attempts to emulate being a socket just enough that it can work with the standard python http.client.HTTPConnection, and doesn't quite make it on python 3.
HTTPConnection calls makefile on the connection object to get a file handle from the socket. sockets and file handles aren't the same thing on windows so python 2 had socket._fileobject to wrap the difference and ssl.Connection simply returned one of those in def makefile.
There is no socket._fileobject in python 3, so I have been looking into how python 3 implements it - turns it there is a new class socket.SocketIO which does something similar. Great!
Unfortunately, it derives from io.RawIOBase which implements readline() (which http.client.HTTPConnection wants to call) by ultimately calling recv_into on the socket - which passes a buffer object that the socket is supposed to read into.
You can't write to objects implementing the buffer interface from pure python.
So I think the options are - either we add some more C to the swigged tier to support this || we try to hack up some derivation of socket.SocketIO with a readline() that doesn't use that interface.