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: Allow chaining function calls on transaction #987

Merged
merged 1 commit into from
Feb 18, 2024

Conversation

shohamazon
Copy link
Collaborator

Issue #, if available:

Description of changes:

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

@shohamazon shohamazon requested a review from a team as a code owner February 18, 2024 10:25

@pytest.mark.parametrize("cluster_mode", [True, False])
@pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3])
async def test_transaction_chaning_calls(self, redis_client: TRedisClient):
Copy link
Contributor

Choose a reason for hiding this comment

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

you don't need to write a test to handle this. Just change the existing transaction test to use chaining.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the current one cant use chaining because we modified it to be more readable

@@ -14,6 +14,8 @@
)
from glide.protobuf.redis_request_pb2 import RequestType

T = TypeVar("T", bound="BaseTransaction")
Copy link
Collaborator

Choose a reason for hiding this comment

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

minor:
change T to TTransaction

TTransaction = TypeVar("TTransaction", bound="BaseTransaction")


@pytest.mark.parametrize("cluster_mode", [True, False])
@pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3])
async def test_transaction_chaning_calls(self, redis_client: TRedisClient):
Copy link
Collaborator

Choose a reason for hiding this comment

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

chaning => chaining

@shohamazon shohamazon merged commit ee1d7cf into valkey-io:main Feb 18, 2024
5 checks passed
@shohamazon shohamazon deleted the python/builder-transaction branch February 18, 2024 15:45
avifenesh pushed a commit to avifenesh/valkey-glide that referenced this pull request Feb 19, 2024
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.

4 participants