diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2019-07-29 13:37:33 -0700 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2019-07-29 13:37:33 -0700 |
commit | f30787856749ce577078e5de12b814ea01736999 (patch) | |
tree | 318c708dadca7f92180166551dbb6729ae1def75 | |
parent | e897c174483275fcb333e02bf36353a6afee44b4 (diff) | |
download | redis-py-f30787856749ce577078e5de12b814ea01736999.tar.gz |
Version 3.3.2, SSL Blocking Exceptions don't use errno.EWOULDBLOCK3.3.2
Ref #1197
-rw-r--r-- | CHANGES | 5 | ||||
-rw-r--r-- | redis/__init__.py | 2 | ||||
-rwxr-xr-x | redis/connection.py | 7 |
3 files changed, 9 insertions, 5 deletions
@@ -1,5 +1,8 @@ +* 3.3.2 + * Further fixed a regression introduced in 3.3.0 involving SSL and + non-blocking sockets. #1197 * 3.3.1 - * Fixed a regression introduced in 3.3.1 involving SSL and non-blocking + * Fixed a regression introduced in 3.3.0 involving SSL and non-blocking sockets. #1197 * 3.3.0 * Resolve a race condition with the PubSubWorkerThread. #1150 diff --git a/redis/__init__.py b/redis/__init__.py index 63b8d9d..234bd65 100644 --- a/redis/__init__.py +++ b/redis/__init__.py @@ -29,7 +29,7 @@ def int_or_str(value): return value -__version__ = '3.3.1' +__version__ = '3.3.2' VERSION = tuple(map(int_or_str, __version__.split('.'))) __all__ = [ diff --git a/redis/connection.py b/redis/connection.py index 5ec2f2e..46d3b20 100755 --- a/redis/connection.py +++ b/redis/connection.py @@ -1,6 +1,5 @@ from __future__ import unicode_literals from distutils.version import StrictVersion -from errno import EWOULDBLOCK from itertools import chain from time import time import io @@ -36,6 +35,8 @@ except ImportError: ssl_available = False if ssl_available: + # note that when using nonblocking sockets over ssl, the ssl module + # raises its own exceptions rather than the normal BlockingIOError blocking_exceptions = ( BlockingIOError, ssl.SSLWantReadError, @@ -184,7 +185,7 @@ class SocketBuffer(object): # blocking error, simply return False indicating that # there's no data to be read. otherwise raise the # original exception. - if raise_on_timeout or ex.errno != EWOULDBLOCK: + if raise_on_timeout: raise return False except socket.timeout: @@ -413,7 +414,7 @@ class HiredisParser(BaseParser): # blocking error, simply return False indicating that # there's no data to be read. otherwise raise the # original exception. - if raise_on_timeout or ex.errno != EWOULDBLOCK: + if raise_on_timeout: raise return False except socket.timeout: |