The Fix
pip install redis==7.1.0
Based on closed redis/redis-py issue #2893 · 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%.
@@ -55,12 +55,17 @@ def connect(self):
def read_response(
- self, disable_decoding=False, *, disconnect_on_error: Optional[bool] = False
+ self,
+ disable_decoding=False,
Traceback (most recent call last):
File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 1108, in run
pubsub.get_message(ignore_subscribe_messages=True, timeout=sleep_time)
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 983, in get_message
response = self.parse_response(block=(timeout is None), timeout=timeout)
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 796, in parse_response
response = self._execute(conn, try_read)
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 772, in _execute
return conn.retry.call_with_retry(
File "/usr/local/lib/python3.10/site-packages/redis/retry.py", line 46, in call_with_retry
return do()
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 773, in <lambda>
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 794, in try_read
return conn.read_response(disconnect_on_error=False, push_request=True)
TypeError: SentinelManagedConnection.read_response() got an unexpected keyword argument 'push_request'
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 apply this fix if the application relies on the previous behavior of ignoring the 'push_request' argument.\n\n
Why This Fix Works in Production
- Trigger: self.run()
- Mechanism: Fixes the unexpected keyword argument 'push_request' in SentinelManagedConnection.read_response() method.
- Why the fix works: Fixes the unexpected keyword argument 'push_request' in SentinelManagedConnection.read_response() method. (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.10 in real deployments (not just unit tests).
- Surfaces as: Traceback (most recent call last):
Proof / Evidence
- GitHub issue: #2893
- Fix PR: https://github.com/redis/redis-py/pull/2894
- First fixed release: 7.1.0
- Reproduced locally: No (not executed)
- Last verified: 2026-02-08
- Confidence: 0.95
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.27
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“The same issue is also valid for the async client: redis.asyncio.client.PubSub.parse_response() is calling redis.asyncio.sentinel.SentinelManagedConnection.read_response() with unexpected push_request argument.”
“Same issue with v5.0.0. The new version seems broken and does not work with Redis Sentinel.”
Failure Signature (Search String)
- self.run()
Error Message
Stack trace
Error Message
-------------
Traceback (most recent call last):
File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 1108, in run
pubsub.get_message(ignore_subscribe_messages=True, timeout=sleep_time)
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 983, in get_message
response = self.parse_response(block=(timeout is None), timeout=timeout)
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 796, in parse_response
response = self._execute(conn, try_read)
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 772, in _execute
return conn.retry.call_with_retry(
File "/usr/local/lib/python3.10/site-packages/redis/retry.py", line 46, in call_with_retry
return do()
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 773, in <lambda>
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 794, in try_read
return conn.read_response(disconnect_on_error=False, push_request=True)
TypeError: SentinelManagedConnection.read_response() got an unexpected keyword argument 'push_request'
Minimal Reproduction
Traceback (most recent call last):
File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 1108, in run
pubsub.get_message(ignore_subscribe_messages=True, timeout=sleep_time)
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 983, in get_message
response = self.parse_response(block=(timeout is None), timeout=timeout)
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 796, in parse_response
response = self._execute(conn, try_read)
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 772, in _execute
return conn.retry.call_with_retry(
File "/usr/local/lib/python3.10/site-packages/redis/retry.py", line 46, in call_with_retry
return do()
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 773, in <lambda>
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 794, in try_read
return conn.read_response(disconnect_on_error=False, push_request=True)
TypeError: SentinelManagedConnection.read_response() got an unexpected keyword argument 'push_request'
Environment
- Python: 3.10
What Broke
The application raises a TypeError when attempting to read responses from Redis Sentinel.
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/2894
First fixed release: 7.1.0
Last verified: 2026-02-08. Validate in your environment.
When NOT to Use This Fix
- Do not apply this fix if the application relies on the previous behavior of ignoring the 'push_request' argument.
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
- 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.