PyMySQL/PyMySQL — pull request #262 by kmerenkov (2014-08-29 11:10:11+00:00)
Title: Implemented "my own" socket.create_connection that sets timeout only for connect operation

Before this change PyMySQL set timeout for all operations: connecting, reading and writing.
With this change `connect_timeout` finally affects only connecting.

Why you'd want to set short timeout for connecting: no time waste if network is really faulty.
For example, a 60 second is MORE than enough to connect to a database.
Why you wouldn't want to set short timeout for reading: imagine that you have a *heavy*
query with joins and stuff and mysql won't reply to you anytime soon, and this is normal,
you don't want to abort.

Hence, `connect_timeout` should not affect reading timeout in any way.

`socket.create_connection` that is shipped with python doesn't make distinction between operations
and sets the same timeout to all operations, hence we cannot use it to set *just* connection
timeout.