diff --git a/kombu/transport/redis.py b/kombu/transport/redis.py index 6571e860..93a21358 100644 --- a/kombu/transport/redis.py +++ b/kombu/transport/redis.py @@ -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 diff --git a/requirements/extras/redis.txt b/requirements/extras/redis.txt index 69fff9ad..b0d3f0fb 100644 --- a/requirements/extras/redis.txt +++ b/requirements/extras/redis.txt @@ -1 +1 @@ -redis>=2.10.5 +redis>=3.2.0