docker/docker-py — pull request #413 by rmohr (2014-12-04 22:58:01+00:00)
Title: keep unix socket alive with python3

Hi,

I am currently working on p3 support for https://github.com/d11wtq/dockerpty. While working on this, I ran into strange socket errors.
It turned out, that the client.attach_socket function was broken because it always returned a closed socket. The problem is related to #357. The patch below keeps the socket open when using python3 or python2.
To achieve this, I am passing arount the SocketIO object instead of the raw socket.

What do you think?

Best Regards,
Roman