Skip to content
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

Merged

Conversation

aaron-congo
Copy link
Collaborator

@aaron-congo aaron-congo commented May 27, 2024

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.

@aaron-congo aaron-congo requested a review from a team as a code owner May 27, 2024 20:48
@aaron-congo aaron-congo force-pushed the python/integ_acongo_object_encoding branch from 3616989 to c73a737 Compare May 27, 2024 20:49
@aaron-congo aaron-congo added the python Python wrapper label May 27, 2024
@@ -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"):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How it worked before?

Copy link
Collaborator Author

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So test never tested 🤦 🤦 🤦

@acarbonetto acarbonetto merged commit c3fab61 into valkey-io:main May 27, 2024
6 checks passed
@acarbonetto acarbonetto deleted the python/integ_acongo_object_encoding branch May 27, 2024 21:39
cyip10 pushed a commit to Bit-Quill/valkey-glide that referenced this pull request Jun 24, 2024
Python: add OBJECT ENCODING command (#308)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Python wrapper
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants