diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2018-11-13 16:44:36 -0800 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2018-11-13 16:44:36 -0800 |
commit | 36a84fc9ac4e06a9b85ccc4e4eda426b387c7093 (patch) | |
tree | da94cf7658346e86eb212d507de9cbd4511b97d8 /benchmarks/base.py | |
parent | 90a52dd5de111f0053bb3ebaa7c78f73a82a1e3e (diff) | |
download | redis-py-36a84fc9ac4e06a9b85ccc4e4eda426b387c7093.tar.gz |
remove legacy Redis class
redis-py maintained backwards compatibility by keeping the old "Redis"
class around for quite some time. While no doubt a convenience for folks
who relied on it, the presence of both Redis and StrictRedis causes
a number of support issues and general confusion. With 3.0, we're
breaking a few things to make redis-py better going forward.
This change removes the old Redis class. We also renamed the StrictRedis
class to Redis and aliased StrictRedis to Redis. For people that have
been using StrictRedis, this should not change anything. You can continue
doing things as you are.
People still using the legacy Redis class will need to update the argument
order for the SETEX, LREM and ZADD commands. Additionally, the return values
for TTL and PTTL now return the integer values -1 when a key exists but
has no expire time and -2 when a key does not exist. Previously these
cases returned a None value in the Redis class.
Diffstat (limited to 'benchmarks/base.py')
-rw-r--r-- | benchmarks/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/benchmarks/base.py b/benchmarks/base.py index a97001f..44e9341 100644 --- a/benchmarks/base.py +++ b/benchmarks/base.py @@ -21,7 +21,7 @@ class Benchmark(object): } defaults.update(kwargs) pool = redis.ConnectionPool(**kwargs) - self._client = redis.StrictRedis(connection_pool=pool) + self._client = redis.Redis(connection_pool=pool) return self._client def setup(self, **kwargs): |