-
Notifications
You must be signed in to change notification settings - Fork 53
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
Python: add OBJECT ENCODING command #1471
Python: add OBJECT ENCODING command #1471
Conversation
3616989
to
c73a737
Compare
@@ -3347,7 +3420,7 @@ async def test_multi_key_command_returns_cross_slot_error( | |||
redis_client.sdiffstore("abc", ["def", "ghi"]), | |||
] | |||
|
|||
if not check_if_server_version_lt(redis_client, "7.0.0"): | |||
if not await check_if_server_version_lt(redis_client, "7.0.0"): |
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.
How it worked before?
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.
From the Python docs:
In the context of Boolean operations, and also when expressions are used by control flow statements, the following values are interpreted as false: False, None, numeric zero of all types, and empty strings and containers (including strings, tuples, lists, dictionaries, sets and frozensets). All other values are interpreted as true.
Before this change, the call to the function (without the await) was returning a reference to a Couroutine object, so this branch was never actually being entered.
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.
So test never tested 🤦 🤦 🤦
Python: add OBJECT ENCODING command (#308)
Issue #, if available:
N/A
Description of changes:
https://redis.io/docs/latest/commands/object-encoding/
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.