The Fix
pip install redis==7.1.0
Based on closed redis/redis-py issue #2677 · PR/commit linked
Production note: Watch p95/p99 latency and retry volume; timeouts can turn into retry storms and duplicate side-effects.
@@ -420,9 +420,13 @@ def parse_item(item):
if isinstance(item[3], list):
result["command"] = space.join(item[3])
+ result["client_address"] = item[4]
+ result["client_name"] = item[5]
else:
def get_slowlog(self, num=None):
redis_command='SLOWLOG GET'
try:
# result = self.r.execute_command(redis_command)
if num:
result = self.r.slowlog_get(num=num)
else:
result = self.r.slowlog_get()
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Option A — Upgrade to fixed release\npip install redis==7.1.0\nWhen NOT to use: Do not use this fix if you require the original behavior of slowlog_get() without the additional fields.\n\n
Why This Fix Works in Production
- Trigger: Platform: Python 3.8.10 on Ubuntu 20.04-05 TLS
- Mechanism: The slowlog_get() method did not return all fields as specified in the Redis documentation
- Why the fix works: Fixes the slowlog_get() return value to include missing fields as per Redis documentation. (first fixed release: 7.1.0).
- If left unfixed, this can cause silent data inconsistencies that propagate (bad cache entries, incorrect downstream decisions).
Why This Breaks in Prod
- Shows up under Python 3.5.1 in real deployments (not just unit tests).
- The slowlog_get() method did not return all fields as specified in the Redis documentation
- Production symptom (often without a traceback): Platform: Python 3.8.10 on Ubuntu 20.04-05 TLS
Proof / Evidence
- GitHub issue: #2677
- Fix PR: https://github.com/redis/redis-py/pull/2732
- First fixed release: 7.1.0
- Reproduced locally: No (not executed)
- Last verified: 2026-02-07
- Confidence: 0.95
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.67
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“This is where the response is parsed and needs to be updated to capture the missing fields.”
Failure Signature (Search String)
- Platform: Python 3.8.10 on Ubuntu 20.04-05 TLS
- **Description**: Description of your issue, stack traces from errors and code that reproduces the issue
Copy-friendly signature
Failure Signature
-----------------
Platform: Python 3.8.10 on Ubuntu 20.04-05 TLS
**Description**: Description of your issue, stack traces from errors and code that reproduces the issue
Error Message
Signature-only (no traceback captured)
Error Message
-------------
Platform: Python 3.8.10 on Ubuntu 20.04-05 TLS
**Description**: Description of your issue, stack traces from errors and code that reproduces the issue
Minimal Reproduction
def get_slowlog(self, num=None):
redis_command='SLOWLOG GET'
try:
# result = self.r.execute_command(redis_command)
if num:
result = self.r.slowlog_get(num=num)
else:
result = self.r.slowlog_get()
Environment
- Python: 3.5.1
What Broke
Users received incomplete slow log entries, leading to confusion and potential debugging issues.
Why It Broke
The slowlog_get() method did not return all fields as specified in the Redis documentation
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/2732
First fixed release: 7.1.0
Last verified: 2026-02-07. Validate in your environment.
When NOT to Use This Fix
- Do not use this fix if you require the original behavior of slowlog_get() without the additional fields.
Verify Fix
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Did This Fix Work in Your Case?
Quick signal helps us prioritize which fixes to verify and improve.
Prevention
- Add a TLS smoke test that performs a real handshake in CI (include CA bundle validation and hostname checks).
- Alert on handshake failures by error string and endpoint to catch cert/CA changes quickly.
- Make timeouts explicit and test them (unit + integration) to avoid silent behavior changes.
- Instrument retries (attempt count + reason) and alert on spikes to catch dependency slowdowns.
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.