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

redis.asyncio.cluster.ClusterPipeline.__bool__() should always return True #3061

Closed
jakob-keller opened this issue Dec 2, 2023 · 0 comments · Fixed by #3068
Closed

redis.asyncio.cluster.ClusterPipeline.__bool__() should always return True #3061

jakob-keller opened this issue Dec 2, 2023 · 0 comments · Fixed by #3068

Comments

@jakob-keller
Copy link
Contributor

Version:
redis-py 5.0.1

Platform:
CPython 3.11.6 on Fargate for arm64

Description:
In #994 it was agreed that pipelines should never be considered "false-y", i.e. always evaluate to True. The change was applied in 8b76019. Since then, asyncio and cluster support were merged and it appears as if asyncio ClusterPipeline instances currently behave differently than other pipeline instances. This is due to the following line:
https://github.com/redis/redis-py/blob/58da813e2ed3ce45d9bc14fff8d0a378b0f5ee82/redis/asyncio/cluster.py#L1432C29-L1432C29

Could you please harmonize the truth value of all pipeline types, i.e. make asyncio ClusterPipeline instances always evaluate to True?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant