Skip to content

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

Closed
@jakob-keller

Description

@jakob-keller

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions