The Fix
pip install redis==7.1.0
Based on closed redis/redis-py issue #3217 · 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%.
@@ -6,7 +6,6 @@ DESTDIR=`dirname "$0"`/keys
cd ${DESTDIR}
-SSL_SUBJECT="/C=CA/ST=Winnipeg/L=Manitoba/O=Some Corp/OU=IT Department/CN=example.com"
which openssl &>/dev/null
if [ $? -ne 0 ]; then
Option A — Upgrade to fixed release\npip install redis==7.1.0\nWhen NOT to use: Do not use this fix if the SSL connection requires specific certificate requirements.\n\n
Why This Fix Works in Production
- Trigger: IndexError: pop from empty list
- Mechanism: The SSL connection example in the documentation used an incorrect keyword argument 'ssl_cert_reqs'
- Why the fix works: Fixes the CNs in the test certificates and updates the documentation for SSL connections in redis-py. (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.5.1 in real deployments (not just unit tests).
- The SSL connection example in the documentation used an incorrect keyword argument 'ssl_cert_reqs'
- Surfaces as: IndexError: pop from empty list
Proof / Evidence
- GitHub issue: #3217
- Fix PR: https://github.com/redis/redis-py/pull/3226
- First fixed release: 7.1.0
- Reproduced locally: No (not executed)
- Last verified: 2026-02-08
- Confidence: 0.85
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.77
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“@boris-garvis Thanks for reporting this. Not only the documentation was off, also the test certificates had some issues.”
Failure Signature (Search String)
- IndexError: pop from empty list
Error Message
Stack trace
Error Message
-------------
IndexError: pop from empty list
Stack trace
Error Message
-------------
TypeError: __init__() got an unexpected keyword argument 'ssl_cert_reqs'
Environment
- Python: 3.5.1
What Broke
Users experienced TypeError when attempting to establish SSL connections using the provided example.
Why It Broke
The SSL connection example in the documentation used an incorrect keyword argument 'ssl_cert_reqs'
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/3226
First fixed release: 7.1.0
Last verified: 2026-02-08. Validate in your environment.
When NOT to Use This Fix
- Do not use this fix if the SSL connection requires specific certificate requirements.
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.
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.