NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #4383 most downloaded on PyPI
Lock context manager implemented via redis SETNX/BLPOP.
Last release 5 months ago
08 Apr 2026
Release timing varies
gaps range from 5 weeks to 3.5 years
Nearly every release is documented
notes for 20 of 20 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
20 releases · first in 2013
Fixed typo when setting daemon mode for the renewal thread. Contributed by Eeo Jun in #94 _.
Fixed typo when setting daemon mode for the renewal thread. Contributed by Eeo Jun in #94.
Fixed syntax in some examples in documentation. Contributed by Lee Bush in #110.
Added the blocking argument to Lock.__init__ to allow this behavior when using it as a context manager. Contributed by Andrew Petriv in #102.
Dropped support for Python 2.7 and 3.6.
Dropped support for Python 2.7 and 3.6.
Switched from Travis to GitHub Actions.
Made logging messages more consistent.
Replaced the redis_lock.refresh.thread.* loggers with a single redis_lock.refresh.thread logger.
Various testing cleanup (mainly removal of hardcoded tmp paths).
One column per quarter.
Made logger names more specific. Now can have granular filtering on these new logger names:
Made logger names more specific. Now can have granular filtering on these new logger names:
redis_lock.acquire (emits DEBUG messages)
redis_lock.acquire (emits WARN messages)
redis_lock.acquire (emits INFO messages)
redis_lock.refresh.thread.start (emits DEBUG messages)
redis_lock.refresh.thread.exit (emits DEBUG messages)
redis_lock.refresh.start (emits DEBUG messages)
redis_lock.refresh.shutdown (emits DEBUG messages)
redis_lock.refresh.exit (emits DEBUG messages)
redis_lock.release (emits DEBUG messages)
Contributed by Salomon Smeke Cohen in #80..
Fixed few CI issues regarding doc checks. Contributed by Salomon Smeke Cohen in #81..
Improved timeout/expire validation so that:
Improved timeout/expire validation so that:
timeout and expire are converted to ``None if they are falsy. Previously only None disabled these options, other falsy values created buggy situations.
Using timeout greater than expire is now allowed, if auto_renewal is set to True. Previously a TimeoutTooLarge error was raised. See #74..
Negative timeout or expire are disallowed. Previously such values were allowed, and created buggy situations. See #73..
Updated benchmark and examples.
Removed the custom script caching code. Now the register_script method from the redis client is used. This will fix possible issue with redis clusters in theory, as the redis client has some specific handling for that.
Added a locked method. Contributed by Artem Slobodkin in #72 _..
Added a locked method. Contributed by Artem Slobodkin in #72..
Fixed regression that can cause deadlocks or slowdowns in certain configurations. See: #71 _..
Fixed regression that can cause deadlocks or slowdowns in certain configurations. See: #71..
Fixed failures when running python-redis-lock 3.3 alongside 3.2. See: #64 _..
Fixed failures when running python-redis-lock 3.3 alongside 3.2. See: #64..
Fixed deprecated use of warnings API. Contributed by Julie MacDonell in #54 _..
Fixed deprecated use of warnings API. Contributed by Julie MacDonell in #54..
Added auto_renewal option in RedisCache.lock (the Django cache backend wrapper). Contributed by c in #55..
Changed log level for "%(script)s not cached" from WARNING to INFO.
Added support for using decode_responses=True. Lock keys are pure ascii now.
Changed the signal key cleanup operation do be done without any expires. This prevents lingering keys around for some time. Contributed by Andrew Pash
Changed the signal key cleanup operation do be done without any expires. This prevents lingering keys around for some time. Contributed by Andrew Pashkin in #38..
Allow locks with given id to acquire. Previously it assumed that if you specify the id then the lock was already acquired. See #44. and #39..
Allow using other redis clients with a strict=False. Normally you're expected to pass in an instance of redis.StrictRedis.
Added convenience method locked_get_or_set to Django cache backend.
Changed the auto renewal to automatically stop the renewal thread if lock gets garbage collected. Contributed by Andrew Pashkin in #33 _..
Changed the auto renewal to automatically stop the renewal thread if lock gets garbage collected. Contributed by Andrew Pashkin in #33..
Previously there was just a check if it was acquired with the same instance (self._held). BACKWARDS INCOMPATIBLE
Changed release so that it expires signal-keys immediately. Contributed by Andrew Pashkin in #28..
Resetting locks (reset or reset_all) will release the lock. If there's someone waiting on the reset lock now it will acquire it. Contributed by Andrew Pashkin in #29..
Added the extend method on Lock objects. Contributed by Andrew Pashkin in #24..
Documentation improvements on release method. Contributed by Andrew Pashkin in #22..
Fixed acquire(block=True) handling when expire option was used (it wasn't blocking indefinitely). Contributed by Tero Vuotila in #35..
Changed release to check if lock was acquired with he same id. If not, NotAcquired will be raised. Previously there was just a check if it was acquired with the same instance (self._held). BACKWARDS INCOMPATIBLE
Removed the force option from release - it wasn't really necessary and it only encourages sloppy programming. See #25.. BACKWARDS INCOMPATIBLE
Dropped tests for Python 2.6. It may work but it is unsupported.
Added the timeout option. Contributed by Victor Torres in #20 _..
Added the timeout option. Contributed by Victor Torres in #20..
Added the auto_renewal option. Contributed by Nick Groenen in #18 _..
Added the auto_renewal option. Contributed by Nick Groenen in #18..
New specific exception classes: AlreadyAcquired and NotAcquired.
New specific exception classes: AlreadyAcquired and NotAcquired.
Slightly improved efficiency when non-waiting acquires are used.
Rename Lock.token to Lock.id. Now only allowed to be set via constructor. Contributed by Jardel Weyrich in #11 _..
Rename Lock.token to Lock.id. Now only allowed to be set via constructor. Contributed by Jardel Weyrich in #11..
Fix Django integration. (reported by Jardel Weyrich)
Fix Django integration. (reported by Jardel Weyrich)
Reorganize tests to use py.test.
Add test for Django integration.
Add reset_all functionality. Contributed by Yokotoka in #7..
Add Lock.reset functionality.
Expose the Lock.token attribute.
* ?
* ?
* ?
* First release on PyPI.
First release on PyPI.
Your coding agent can read these notes before it upgrades. Set up the MCP server →