提交 f966b64f 编写于 作者: A Andy McCurdy

Version 3.3.3. Accomodate Python 2.7.x versions < 2.7.9.

The SSL module includes in Python versions < 2.7.9 does not include
the SSLWantReadError or SSLWantWriteError exceptions. As such we can't
assume they are present just because the ssl module happens to be installed.

Fixes #1197
上级 c1b99413
* 3.3.3
* The SSL module in Python < 2.7.9 handles non-blocking sockets
differently than 2.7.9+. This patch accomodates older versions. #1197
* 3.3.2
* Further fixed a regression introduced in 3.3.0 involving SSL and
non-blocking sockets. #1197
......
......@@ -29,7 +29,7 @@ def int_or_str(value):
return value
__version__ = '3.3.2'
__version__ = '3.3.3'
VERSION = tuple(map(int_or_str, __version__.split('.')))
__all__ = [
......
......@@ -34,9 +34,9 @@ try:
except ImportError:
ssl_available = False
if ssl_available:
if ssl_available and hasattr(ssl, 'SSLWantReadError'):
# note that when using nonblocking sockets over ssl, the ssl module
# raises its own exceptions rather than the normal BlockingIOError
# in python > 2.7.9 raises its own exceptions rather than BlockingIOError
blocking_exceptions = (
BlockingIOError,
ssl.SSLWantReadError,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册