-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support version 3 of the redis python library #49445
Conversation
@@ -99,7 +99,10 @@ def set(self, key, value): | |||
else: | |||
self._db.set(self._make_key(key), value2) | |||
|
|||
self._db.zadd(self._keys_set, time.time(), key) | |||
if VERSION[0] == 2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we probably want <= 2
... those using the OS package for redis python might have ancient libs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As part of verifying that VERSION
was available, I checked the tags in GitHub, and found that 2.4.6 (the oldest in GitHub) was released in Jul 13, 2011. It seems as though 2.4.5 was when VERSION
was added. Roughly 2.4.5 was released around Jun 7, 2011.
As such, this change would put a requirement on at least 2.4.5, although I have no idea whether other functionality would work this far back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gtk, so it will just fail on import for older redis, we might want to capture that and state min requirement is 2.4.5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
…9445) * Support version 3 of the redis python library. Fixes ansible#49341 * Document 2.4.5 minimum redis-py version (cherry picked from commit 77de219) Co-authored-by: Matt Martz <matt@sivel.net>
* Support version 3 of the redis python library. Fixes #49341 * Document 2.4.5 minimum redis-py version (cherry picked from commit 77de219) Co-authored-by: Matt Martz <matt@sivel.net>
* Support version 3 of the redis python library. Fixes ansible#49341 * Document 2.4.5 minimum redis-py version
SUMMARY
Support version 3 of the redis python library. Fixes #49341
Version 3 added the following backwards incompatible change:
ISSUE TYPE
COMPONENT NAME
lib/ansible/plugins/cache/redis.py
ADDITIONAL INFORMATION