Jump to solution
Verify

The Fix

pip install redis==4.3.3

Based on closed redis/redis-py issue #2209 · 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
@@ -77,7 +77,6 @@ def __init__( redis, name: str, - *, timeout: Optional[Number] = None, sleep: Number = 0.1,
repro.py
from redis import Redis from redis.lock import Lock def main(): r = Redis("localhost:6379") Lock(r, "schlage", None) if __name__ == "__main__": main()
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==4.3.3\nWhen NOT to use: This fix should not be applied if maintaining backward compatibility with existing positional argument usage is required.\n\n

Why This Fix Works in Production

  • Trigger: redis432 ❯ python nope.py
  • Mechanism: The Lock class constructor changed to require keyword-only arguments, causing TypeErrors with positional arguments
  • Why the fix works: Fixes a backward compatibility issue in the Lock class introduced in version 4.3.2, resolving the TypeError when using positional arguments. (first fixed release: 4.3.3).
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 Lock class constructor changed to require keyword-only arguments, causing TypeErrors with positional arguments
  • Surfaces as: redis432 ❯ python nope.py

Proof / Evidence

  • GitHub issue: #2209
  • Fix PR: https://github.com/redis/redis-py/pull/2210
  • First fixed release: 4.3.3
  • 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.68

Verified Execution

We executed the runnable minimal repro in a temporary environment and captured exit codes + logs.

  • Status: PASS
  • Ran: 2026-02-11T16:52:29Z
  • Package: redis
  • Fixed: 4.3.3
  • Mode: fixed_only
  • Outcome: ok
Logs
affected (exit=None)
fixed (exit=0)

Discussion

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

“@sgg Sorry, this backward happened unintentionally and fixed in 4.3.3. Thank you for reporting this.”
@dvora-h · 2022-06-02 · confirmation · source
“@dvora-h No worries, thanks for the fast fix. You may want to yank the 4.3.2 release on PyPI to prevent others from running into this.…”
@sgg · 2022-06-02 · source
“PR #2137 changed also the signature of Lock.acquire() to accept only keyword arguments, so maybe that should be noted as a backward incompatibility note somewhere.”
@lelit · 2022-06-03 · source
“oh this is weird, here I was fixing it in dogpile.”
@zzzeek · 2022-06-08 · source

Failure Signature (Search String)

  • redis432 ❯ python nope.py

Error Message

Stack trace
error.txt
Error Message ------------- redis432 ❯ python nope.py Traceback (most recent call last): File "nope.py", line 9, in <module> main() File "nope.py", line 6, in main Lock(r, "schlage", None) TypeError: __init__() takes 3 positional arguments but 4 were given

Minimal Reproduction

repro.py
from redis import Redis from redis.lock import Lock def main(): r = Redis("localhost:6379") Lock(r, "schlage", None) if __name__ == "__main__": main()

Environment

  • Python: 3.9

Why It Broke

The Lock class constructor changed to require keyword-only arguments, causing TypeErrors with positional arguments

Fix Options (Details)

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

pip install redis==4.3.3

When NOT to use: This fix should not be applied if maintaining backward compatibility with existing positional argument usage is required.

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

First fixed release: 4.3.3

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 should not be applied if maintaining backward compatibility with existing positional argument usage is required.

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

  • 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

VersionStatus
4.3.3 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.