Jump to solution
Verify

The Fix

pip install redis==7.1.0

Based on closed redis/redis-py issue #3508 · 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%.

Jump to Verify Open PR/Commit
@@ -103,7 +103,7 @@ runs: if (( $REDIS_MAJOR_VERSION < 7 )) && [ "$protocol" == "3" ]; then echo "Skipping module tests: Modules doesn't support RESP3 for Redis versions < 7" - invoke standalone-tests --redis-mod-url=${REDIS_MOD_URL} $eventloop --protocol="${protocol}" --extra-markers="not redismod" + invoke standalone-tests --redis-mod-url=${REDIS_MOD_URL} $eventloop --protocol="${protocol}" --extra-markers="not redismod and not cp_integration" else
repro.py
$ wget https://github.com/redis/redis-py/archive/refs/tags/v5.2.1.tar.gz $ gtar xf v5.2.1.tar.gz $ cd redis-py-5.2.1/ $ env - PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTEST_PLUGINS="asyncio,pytest_cov,timeout" pytest -m "not ssl" tests/test_asyncio/test_cluster.py::TestSSL /usr/lib/python3.9/vendor-packages/pytest_asyncio/plugin.py:207: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) ============================= test session starts ============================== platform sunos5 -- Python 3.9.21, pytest-8.3.3, pluggy-1.5.0 rootdir: /tmp/redis/redis-py-5.2.1 configfile: pytest.ini plugins: asyncio-0.25.2, cov-6.0.0, timeout-2.3.1 asyncio: mode=auto, asyncio_default_fixture_loop_scope=None timeout: 30.0s timeout method: signal timeout func_only: False collected 0 items / 1 error ==================================== ERRORS ==================================== _____________ ERROR collecting tests/test_asyncio/test_cluster.py ______________ tests/test_asyncio/test_cluster.py:2888: in <module> class TestSSL: tests/test_asyncio/test_cluster.py:2896: in TestSSL CLIENT_CERT, CLIENT_KEY, CA_CERT = get_tls_certificates("cluster") tests/ssl_utils.py:30: in get_tls_certificates raise OSError(f"No SSL certificates found. They should be in {cert_dir}") E OSError: No SSL certificates found. They should be in /tmp/redis/dockers/cluster/tls =========================== short test summary info ============================ ERROR tests/test_asyncio/test_cluster.py - OSError: No SSL certificates found. They should be in /tmp/redis/dockers/cl... =============================== 1 error in 0.13s =============================== ERROR: found no collectors for /tmp/redis/redis-py-5.2.1/tests/test_asyncio/test_cluster.py::TestSSL $
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
Option A — Upgrade to fixed release\npip install redis==7.1.0\nWhen NOT to use: This fix is not applicable if the environment does not require SSL certificates.\n\n

Why This Fix Works in Production

  • Trigger: _____________ ERROR collecting tests/test_asyncio/test_cluster.py ______________
  • Mechanism: The test fails due to missing SSL certificates when Docker Compose is not used
  • Why the fix works: The issue regarding missing SSL certificates during tests has been resolved in the master branch as part of PR #3445. (first fixed release: 7.1.0).
Production impact:
  • 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.9 in real deployments (not just unit tests).
  • The test fails due to missing SSL certificates when Docker Compose is not used
  • Surfaces as: _____________ ERROR collecting tests/test_asyncio/test_cluster.py ______________

Proof / Evidence

  • GitHub issue: #3508
  • Fix PR: https://github.com/redis/redis-py/pull/3445
  • 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.35

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“The issue is fixed in master branch as part of PR #3445 (https://github.com/redis/redis-py/pull/3445/files#diff-86b54cd930d82017acd739ba6635fa6ee043ce58e554ae2f3008d61a4daa62a9) @vladvildanov, should we add a fix for 5.2, or is fixing the…”
@petyaslavova · 2025-03-10 · confirmation · source
“Hi! Are you running all tests or just cluster one? I'm trying to reproduce the issue, but it looks like tests with ssl mark is…”
@vladvildanov · 2025-02-12 · source
“I do see this (please find the pip freeze output below): <details><summary>pip freeze</summary> </details>”
@mtelka · 2025-02-17 · source
“@petyaslavova This one isn't a CVE or critical bug, fix for 5.3 is enough”
@vladvildanov · 2025-03-26 · source

Failure Signature (Search String)

  • _____________ ERROR collecting tests/test_asyncio/test_cluster.py ______________

Error Message

Stack trace
error.txt
Error Message ------------- _____________ ERROR collecting tests/test_asyncio/test_cluster.py ______________ tests/test_asyncio/test_cluster.py:2888: in <module> class TestSSL: tests/test_asyncio/test_cluster.py:2896: in TestSSL CLIENT_CERT, CLIENT_KEY, CA_CERT = get_tls_certificates("cluster") tests/ssl_utils.py:30: in get_tls_certificates raise OSError(f"No SSL certificates found. They should be in {cert_dir}") E OSError: No SSL certificates found. They should be in $(BUILD_DIR)/build/dockers/cluster/tls

Minimal Reproduction

repro.py
$ wget https://github.com/redis/redis-py/archive/refs/tags/v5.2.1.tar.gz $ gtar xf v5.2.1.tar.gz $ cd redis-py-5.2.1/ $ env - PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTEST_PLUGINS="asyncio,pytest_cov,timeout" pytest -m "not ssl" tests/test_asyncio/test_cluster.py::TestSSL /usr/lib/python3.9/vendor-packages/pytest_asyncio/plugin.py:207: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) ============================= test session starts ============================== platform sunos5 -- Python 3.9.21, pytest-8.3.3, pluggy-1.5.0 rootdir: /tmp/redis/redis-py-5.2.1 configfile: pytest.ini plugins: asyncio-0.25.2, cov-6.0.0, timeout-2.3.1 asyncio: mode=auto, asyncio_default_fixture_loop_scope=None timeout: 30.0s timeout method: signal timeout func_only: False collected 0 items / 1 error ==================================== ERRORS ==================================== _____________ ERROR collecting tests/test_asyncio/test_cluster.py ______________ tests/test_asyncio/test_cluster.py:2888: in <module> class TestSSL: tests/test_asyncio/test_cluster.py:2896: in TestSSL CLIENT_CERT, CLIENT_KEY, CA_CERT = get_tls_certificates("cluster") tests/ssl_utils.py:30: in get_tls_certificates raise OSError(f"No SSL certificates found. They should be in {cert_dir}") E OSError: No SSL certificates found. They should be in /tmp/redis/dockers/cluster/tls =========================== short test summary info ============================ ERROR tests/test_asyncio/test_cluster.py - OSError: No SSL certificates found. They should be in /tmp/redis/dockers/cl... =============================== 1 error in 0.13s =============================== ERROR: found no collectors for /tmp/redis/redis-py-5.2.1/tests/test_asyncio/test_cluster.py::TestSSL $

Environment

  • Python: 3.9

What Broke

Tests fail with OSError indicating no SSL certificates found, impacting test execution.

Why It Broke

The test fails due to missing SSL certificates when Docker Compose is not used

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

pip install redis==7.1.0

When NOT to use: This fix is not applicable if the environment does not require SSL certificates.

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/3445

First fixed release: 7.1.0

Last verified: 2026-02-09. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • This fix is not applicable if the environment does not require SSL certificates.

Verify Fix

verify
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

VersionStatus
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.