The Fix
pip install redis==7.1.0
Based on closed redis/redis-py issue #1374 · PR/commit linked
@@ -404,7 +404,12 @@ def parse_slowlog_get(response, **options):
'start_time': int(item[1]),
'duration': int(item[2]),
- 'command': space.join(item[3])
+ 'command':
+ # Redis Enterprise injects another entry at index [3], which has
Option A — Upgrade to fixed release\npip install redis==7.1.0\nWhen NOT to use: This fix is not applicable if the Redis version is below 4 or if the slowlog format is different.\n\n
Why This Fix Works in Production
- Trigger: slowlog get - does not include fields added in Redis version 4
- Mechanism: The slowlog parsing did not account for Redis Enterprise cases where the command is at index 4 instead of index 3
- Why the fix works: Modifies the slowlog parsing to handle Redis Enterprise cases where the command is at index 4 instead of index 3. (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 parsing did not account for Redis Enterprise cases where the command is at index 4 instead of index 3
- Production symptom (often without a traceback): slowlog get - does not include fields added in Redis version 4
Proof / Evidence
- GitHub issue: #1374
- Fix PR: https://github.com/redis/redis-py/pull/1352
- 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.72
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“noticed in PR https://github.com/andymccurdy/redis-py/pull/1352”
“@ian28223 let me know if you want to work on this issue. If not, I'll handle it.”
“@RoeyPrat feel free to work on it and close mine. please link me to the new PR though so I can watch it. Thanks!”
Failure Signature (Search String)
- slowlog get - does not include fields added in Redis version 4
- **Description**: Description of your issue, stack traces from errors and code that reproduces the issue
Copy-friendly signature
Failure Signature
-----------------
slowlog get - does not include fields added in Redis version 4
**Description**: Description of your issue, stack traces from errors and code that reproduces the issue
Error Message
Signature-only (no traceback captured)
Error Message
-------------
slowlog get - does not include fields added in Redis version 4
**Description**: Description of your issue, stack traces from errors and code that reproduces the issue
Environment
- Python: 3.5.1
What Broke
Slowlog entries do not include client IP address and name, leading to incomplete logs.
Why It Broke
The slowlog parsing did not account for Redis Enterprise cases where the command is at index 4 instead of index 3
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/1352
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 Redis version is below 4 or if the slowlog format is different.
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.