Repository navigation
Immutable
release. Only release title and notes can be modified.
Bug fixes
- An async lock acquired in a task that has since finished, such as with
asyncio.run(lock.acquire()), is released again when the lock is garbage collected while held. Self-deadlock detection kept a strong reference to that task, whose result references the lock, so the lock was never finalized and stayed held until the process exited (#1150) by @vinilpolepalli. - On POSIX, if an exhausted disk quota prevents
SoftFileLockfrom removing a failed marker, cleanup tries to leave a one-byte record, as it already does for a full filesystem. On filesystems with atomic exchange, a later caller can reclaim it once space is available (#1147) by @darrenhuai and @gaborbernat. - Singleton locks and
SoftFileLeasesingletons accept the same bound method passed again ason_acquiredoron_compromise, instead of treating each attribute access as a different callback. A built-in bound method, such asrecords.append, still has to be the same saved object (#1139) by @feiiiiii5, @gaborbernat and @LemonCondor.
Security
- On Unix, when creating the lock file is denied,
FileLockno longer follows a symlink at the lock path to decide whether the file exists. Another account that swaps one in can no longer learn from howacquire()fails whether the symlink's target exists for the locking account. Such a symlink now fails withELOOPwhatever it points to (#1144) by @gaborbernat.
Performance
- Importing filelock no longer slows every audited call in the process, such as
id(): the fork-safety audit hook is installed on first lock use instead of at import (#1152) by @gaborbernat.
New Contributors
- @vinilpolepalli made their first contribution in #1150