Revert #954 and update redis-py to at least 3.2.0 (#1011)

This reverts #954, and bumps the required redis-py dependency to 3.2.0
to include this fix:

4e1e748092

Fixes #1006
This commit is contained in:
Peter Lithammer 2019-02-22 07:09:39 +01:00 committed by Asif Saif Uddin
parent 30f52ad329
commit eb6e4c8d51
2 changed files with 4 additions and 18 deletions

View File

@ -931,22 +931,8 @@ class Channel(virtual.Channel):
if asynchronous:
class Connection(connection_cls):
def disconnect(self):
# NOTE: see celery issue #3898
# redis-py Connection shutdown()s the socket
# which causes all copies of file descriptor
# to become unusable, however close() only
# affect process-local copies of fds.
# So we just override Connection's disconnect method.
self._parser.on_disconnect()
super(Connection, self).disconnect()
channel._on_connection_disconnect(self)
if self._sock is None:
return
try:
# self._sock.shutdown(socket.SHUT_RDWR)
self._sock.close()
except socket.error:
pass
self._sock = None
connection_cls = Connection
connparams['connection_class'] = connection_cls
@ -964,9 +950,9 @@ class Channel(virtual.Channel):
return redis.ConnectionPool(**params)
def _get_client(self):
if redis.VERSION < (2, 10, 5):
if redis.VERSION < (3, 2, 0):
raise VersionMismatch(
'Redis transport requires redis-py versions 2.10.5 or later. '
'Redis transport requires redis-py versions 3.2.0 or later. '
'You have {0.__version__}'.format(redis))
return redis.StrictRedis

View File

@ -1 +1 @@
redis>=2.10.5
redis>=3.2.0