The Fix
pip install redis==7.1.0
Based on closed redis/redis-py issue #3714 · PR/commit linked
@@ -1161,9 +1161,12 @@ async def get_message(
return None
- def ping(self, message=None) -> Awaitable:
+ def ping(self, message=None) -> Awaitable[bool]:
"""
Option A — Upgrade to fixed release\npip install redis==7.1.0\nWhen NOT to use: This fix is not applicable if the documentation does not need clarification.\n\n
Why This Fix Works in Production
- Trigger: I suggest changing the return-type in the documentation to:
- Mechanism: The documentation incorrectly stated the return type of the ping() method
- Why the fix works: Updated the documentation for the ping() method to clarify its return type and behavior. (first fixed release: 7.1.0).
Why This Breaks in Prod
- The documentation incorrectly stated the return type of the ping() method
- Production symptom (often without a traceback): I suggest changing the return-type in the documentation to:
Proof / Evidence
- GitHub issue: #3714
- Fix PR: https://github.com/redis/redis-py/pull/3789
- First fixed release: 7.1.0
- Reproduced locally: No (not executed)
- Last verified: 2026-02-09
- Confidence: 0.95
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.79
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“Hi @codebude, thanks for bringing this to our attention! We will have a look at it soon.”
Failure Signature (Search String)
- I suggest changing the return-type in the documentation to:
Copy-friendly signature
Failure Signature
-----------------
I suggest changing the return-type in the documentation to:
Error Message
Signature-only (no traceback captured)
Error Message
-------------
I suggest changing the return-type in the documentation to:
What Broke
Users were confused about the return type of the ping() method, leading to incorrect usage.
Why It Broke
The documentation incorrectly stated the return type of the ping() method
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/3789
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 documentation does not need clarification.
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.