summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--releasenotes/notes/remove-strict-redis-f2a5a924b314de41.yaml4
-rw-r--r--taskflow/tests/utils.py2
-rw-r--r--taskflow/utils/redis_utils.py8
3 files changed, 9 insertions, 5 deletions
diff --git a/releasenotes/notes/remove-strict-redis-f2a5a924b314de41.yaml b/releasenotes/notes/remove-strict-redis-f2a5a924b314de41.yaml
new file mode 100644
index 0000000..c11467c
--- /dev/null
+++ b/releasenotes/notes/remove-strict-redis-f2a5a924b314de41.yaml
@@ -0,0 +1,4 @@
+---
+upgrade:
+ - |
+ The minimum redis-py version required is now >= 3.0.0
diff --git a/taskflow/tests/utils.py b/taskflow/tests/utils.py
index 6c2f13a..2b02759 100644
--- a/taskflow/tests/utils.py
+++ b/taskflow/tests/utils.py
@@ -77,7 +77,7 @@ def zookeeper_available(min_version, timeout=3):
def redis_available(min_version):
- client = redis.StrictRedis()
+ client = redis.Redis()
try:
client.ping()
except Exception:
diff --git a/taskflow/utils/redis_utils.py b/taskflow/utils/redis_utils.py
index 373ab2d..279d962 100644
--- a/taskflow/utils/redis_utils.py
+++ b/taskflow/utils/redis_utils.py
@@ -33,7 +33,7 @@ def _raise_on_closed(meth):
return wrapper
-class RedisClient(redis.StrictRedis):
+class RedisClient(redis.Redis):
"""A redis client that can be closed (and raises on-usage after closed).
TODO(harlowja): if https://github.com/andymccurdy/redis-py/issues/613 ever
@@ -48,9 +48,9 @@ class RedisClient(redis.StrictRedis):
self.closed = True
self.connection_pool.disconnect()
- execute_command = _raise_on_closed(redis.StrictRedis.execute_command)
- transaction = _raise_on_closed(redis.StrictRedis.transaction)
- pubsub = _raise_on_closed(redis.StrictRedis.pubsub)
+ execute_command = _raise_on_closed(redis.Redis.execute_command)
+ transaction = _raise_on_closed(redis.Redis.transaction)
+ pubsub = _raise_on_closed(redis.Redis.pubsub)
class UnknownExpire(enum.IntEnum):