The Fix
pip install redis==7.1.0
Based on closed redis/redis-py issue #3061 · PR/commit linked
Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.
@@ -57,6 +57,7 @@
* Make `ClusterCommandsProtocol` an actual Protocol
* Add `sum` to DUPLICATE_POLICY documentation of `TS.CREATE`, `TS.ADD` and `TS.ALTER`
+ * Prevent async ClusterPipeline instances from becoming "false-y" in case of empty command stack (#3061)
* 4.1.3 (Feb 8, 2022)
Option A — Upgrade to fixed release\npip install redis==7.1.0\nWhen NOT to use: This fix is not applicable if the pipeline's truthiness is intentionally designed to reflect its state.\n\n
Why This Fix Works in Production
- Trigger: Users experience unexpected behavior when empty pipelines are treated as false.
- Mechanism: async ClusterPipeline instances incorrectly evaluate to false when empty
- Why the fix works: Prevent async ClusterPipeline instances from becoming 'false-y' in case of empty command stack. (first fixed release: 7.1.0).
- If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.
Why This Breaks in Prod
- Shows up under Python 3.11.6 in real deployments (not just unit tests).
- async ClusterPipeline instances incorrectly evaluate to false when empty
- Production symptom (often without a traceback): Users experience unexpected behavior when empty pipelines are treated as false.
Proof / Evidence
- GitHub issue: #3061
- Fix PR: https://github.com/redis/redis-py/pull/3068
- First fixed release: 7.1.0
- Reproduced locally: No (not executed)
- Last verified: 2026-02-09
- Confidence: 0.85
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.74
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“**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”
Failure Signature (Search String)
- Users experience unexpected behavior when empty pipelines are treated as false.
Copy-friendly signature
Failure Signature
-----------------
Users experience unexpected behavior when empty pipelines are treated as false.
Error Message
Signature-only (no traceback captured)
Error Message
-------------
Users experience unexpected behavior when empty pipelines are treated as false.
Environment
- Python: 3.11.6
What Broke
Users experience unexpected behavior when empty pipelines are treated as false.
Why It Broke
async ClusterPipeline instances incorrectly evaluate to false when empty
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install redis==7.1.0
Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.
Fix reference: https://github.com/redis/redis-py/pull/3068
First fixed release: 7.1.0
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix is not applicable if the pipeline's truthiness is intentionally designed to reflect its state.
Did This Fix Work in Your Case?
Quick signal helps us prioritize which fixes to verify and improve.
Prevention
- Capture the exact failing error string in logs and tests so you can reproduce via a minimal script.
- Pin production dependencies and upgrade only with a reproducible test that hits the failing path.
Version Compatibility Table
| Version | Status |
|---|---|
| 7.1.0 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.