diff options
author | Zuul <zuul@review.opendev.org> | 2023-02-17 13:43:33 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2023-02-17 13:43:33 +0000 |
commit | 4239bcaa56bfc6ee0bb727ab817229a116bc992b (patch) | |
tree | e09f2a1c6501d2abe3e8aa1c0b43b6d3a70ce2f5 | |
parent | 91d7c35f1c11b57c4b3d625c4810dbfa1437191d (diff) | |
parent | f8d80022f3922a6765df3f9a7f44982aca031c22 (diff) | |
download | osprofiler-4239bcaa56bfc6ee0bb727ab817229a116bc992b.tar.gz |
Merge "Change StrictRedis usage to Redis"
-rw-r--r-- | osprofiler/drivers/redis_driver.py | 4 | ||||
-rw-r--r-- | releasenotes/notes/remove-strict-redis-9eb43d30c9c1fc43.yaml | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/osprofiler/drivers/redis_driver.py b/osprofiler/drivers/redis_driver.py index ba7a121..db861f6 100644 --- a/osprofiler/drivers/redis_driver.py +++ b/osprofiler/drivers/redis_driver.py @@ -37,7 +37,7 @@ class Redis(base.Driver): service=service, host=host, conf=conf, **kwargs) try: - from redis import StrictRedis + from redis import Redis as _Redis except ImportError: raise exc.CommandError( "To use OSProfiler with Redis driver, " @@ -46,7 +46,7 @@ class Redis(base.Driver): # only connection over network is supported with schema # redis://[:password]@host[:port][/db] - self.db = StrictRedis.from_url(self.connection_str) + self.db = _Redis.from_url(self.connection_str) self.namespace_opt = "osprofiler_opt:" self.namespace = "osprofiler:" # legacy self.namespace_error = "osprofiler_error:" diff --git a/releasenotes/notes/remove-strict-redis-9eb43d30c9c1fc43.yaml b/releasenotes/notes/remove-strict-redis-9eb43d30c9c1fc43.yaml new file mode 100644 index 0000000..c11467c --- /dev/null +++ b/releasenotes/notes/remove-strict-redis-9eb43d30c9c1fc43.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + The minimum redis-py version required is now >= 3.0.0 |