Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change ssl to return a socket.timeout exception on timeout instead of…
… an SSLError Back in Python 3.2, ssl.SSLError used to be a subclass of socket.error (see https://docs.python.org/3/library/ssl.html#exceptions), so timeouts on monkeypatched ssl sockets would be properly caught by socket.timeout excpetion handlers in applications. However, since Python 3.3 ssl.SSLerror is a subclass of OSError, which signifies a different (typically fatal) type of error that is usually not handled gracefully by applications. By changing the timeout excpetion back to socket.timeout, libraries such as pymysql and redis will again properly support TLS-connections in monkeypatched apoplications.
- Loading branch information