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 ZINTERCARD command #1418

Merged
merged 5 commits into from
May 17, 2024

Conversation

aaron-congo
Copy link
Collaborator

Issue #, if available:
N/A

Description of changes:
https://redis.io/docs/latest/commands/zintercard/

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Member

@shohamazon shohamazon left a comment

Choose a reason for hiding this comment

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

good job :)

@pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3])
async def test_zintercard(self, redis_client: TRedisClient):
min_version = "7.0.0"
if await check_if_server_version_lt(redis_client, min_version):
Copy link
Member

Choose a reason for hiding this comment

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

same, I think a function for that would be good

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure I understand, can you clarify? Are you suggesting a skip_if_server_version_lt function that encapsulates lines 2528 to 2530?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd like to see a function which run on the very beginning and sets a global value with the version.
Furthermore, in java, C# and go clients we check binary version, not what server returns.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@shohamazon I suggest we merge this PR for now, you can answer my questions above and then we can go ahead and make the changes in all places that use these lines if we decide to go ahead

Copy link
Member

Choose a reason for hiding this comment

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

@aaron-congo yes, skip_if_server_version_lt sounds good and could be vey useful

python/python/glide/async_commands/core.py Show resolved Hide resolved
@aaron-congo aaron-congo force-pushed the python/integ_acongo_zintercard branch 2 times, most recently from 8cd83f8 to 4f65653 Compare May 16, 2024 23:41
@aaron-congo aaron-congo force-pushed the python/integ_acongo_zintercard branch from 4f65653 to 0fbe5b0 Compare May 17, 2024 20:03
@aaron-congo aaron-congo force-pushed the python/integ_acongo_zintercard branch from 501f6bc to e5f0da2 Compare May 17, 2024 22:36
@acarbonetto acarbonetto merged commit 9ef8095 into aws:main May 17, 2024
45 checks passed
@acarbonetto acarbonetto deleted the python/integ_acongo_zintercard branch May 17, 2024 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants