Skip to content

fix(deps): update dependency filelock to v4 - #465

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/filelock-4.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/filelock-4.x

Conversation

@renovate

@renovate renovate Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
filelock >=3.20.3,<4 → >=4.2.4,<5 age confidence

Release Notes

tox-dev/py-filelock (filelock)

v4.2.4

Compare Source

  • Keep GitHub Release notes free of extra blank lines while retaining the PyPI and version comparison links. #​863

PyPI release

Full Changelog: tox-dev/filelock@4.2.3...4.2.4

v4.2.3

Compare Source

  • Creating a lock on a Python 3.15 interpreter without types.LazyImportType no longer triggers AttributeError at
    exit. #​860
  • Handle EFTYPE when a no-follow open refuses a symlink in a soft reader/writer lock's protocol tree, so heartbeat
    reports lost ownership rather than a transient refresh error.

PyPI release

Full Changelog: tox-dev/filelock@4.2.2...4.2.3

v4.2.2

Compare Source

Bug fixes
  • Fix a lock on a relative path that stayed held after a later with lock: ended, when an earlier acquire() had failed because the working directory no longer exists. That call still raises FileNotFoundError, and it now leaves the lock's hold count unchanged. #​856 by @​spicysharkco.

PyPI release

Full Changelog

v4.2.1

Compare Source

Bug fixes
  • On a singleton wrapper, AsyncReadWriteLock.close() and AsyncSoftReadWriteLock.close() end only the holds that tasks acquired through that wrapper. A reader that arrives during close() gets the closed error instead of joining the ending hold. After synchronous code closes or force-releases the shared lock, the wrappers refuse to admit readers into the ended hold, and close() on such a wrapper returns. Closing one wrapper no longer ends a task's nested hold taken through another wrapper on the same path. #​832 by @​gaborbernat.
  • ReadWriteLock locks again after a release() that an exception from a signal handler interrupted. The async read-write wrappers stop admitting readers into such a level. The async read-write locks forget a hold whose backend release failed after the backend let go, and they free the memory of each acquire that times out or is canceled. AsyncFileLock returns from release() after a few hundred acquires gave up behind a waiting one. An exception from a signal handler delivered while an AsyncFileLock call joins its queue no longer blocks every later call on that lock. #​833 by @​gaborbernat.
  • Fix ReadWriteLock acting on -journal, -wal or -shm files another process puts beside its database: a write could land in another file, a reader could get in beside a writer, and an acquire could fail. SQLite now opens the database by name only in a directory no other account can write, and through a private hard link elsewhere. On Windows the directory's access control list decides. Where hard links are unavailable, keep the database in a directory other accounts cannot write, such as one under %LOCALAPPDATA%. The lock removes link directories through a checked descriptor rather than by name, reads a link directory's name only when the locking account owns it, and leaves alone a directory with other content renamed onto a link directory's name. A database whose schema takes more than a few kilobytes to load raises ValueError instead of running past the acquire timeout. #​834 by @​gaborbernat.
  • Fix five bugs in opening the lock file. UnixFileLock no longer truncates a file it did not create, such as one renamed to the lock path, and no longer applies mode to it. An on_acquired hook that writes holder metadata now truncates the file itself. A lease (Linux) or an oplock (Windows) on the lock file or a soft lock's marker no longer holds acquire() past its timeout or blocking=False, and an oplock no longer holds release(); ReadWriteLock on Windows waits for its timeout and raises Timeout. On Windows, a mode without group and other bits, such as 0o600, now creates the lock file with an owner-only permission list; the ReadWriteLock database gets the same. The soft locks' writability check no longer follows a symlink swapped in at the lock path. On a filesystem without flock, a contender from another account now waits on a marker it cannot write instead of raising PermissionError. #​835 by @​gaborbernat.
  • Fix SoftFileLock, MarkerSoftFileLock and SoftFileLease removing a live holder's marker in three cases: the holder and the contender run in Linux time namespaces with different boottime offsets; only one of them can read the boot id; a process other than the owner rewrote the marker. Soft markers no longer carry group or other write bits. A process name containing a carriage return or another line separator no longer makes the stale check raise ValueError. When /proc/self/ns/time exists but cannot be read, the stale check no longer compares start times and keeps the marker. #​836 by @​gaborbernat.
  • The async read-write locks record their hold under a task owner, so synchronous code on the executor thread that took the hold can no longer re-enter or release it. AsyncSoftReadWriteLock gives back one level on release, so synchronous readers of a shared singleton keep theirs. SoftReadWriteLock tracks read levels per thread: release() from a thread that holds none raises RuntimeError. After its heartbeat recorded a lost hold, it refuses new acquires until that hold is released. #​838 by @​gaborbernat.
  • StrictSoftFileLock creates <path>.filelock and its claims directory with the lock's mode and sets the sticky bit (a directory flag that lets only a file's owner remove it) on both. On the next acquisition it narrows a directory it owns that an earlier release created wider; it leaves a directory of another account as it is, so remove such leftovers by hand. It reaches claims through a descriptor opened without following symlinks; on Windows it holds both directories open and refuses a junction (a directory that points at another directory). Under a sticky parent such as /tmp it refuses a coordination directory of another account, as SoftReadWriteLock does for <path>.rw. One read grace now covers a whole claim scan, a failed claim cleanup no longer leaves the sentinel descriptor open, and a non-regular node at a sentinel private-record name raises SoftFileLockProtocolError. On Windows, contenders read claims without blocking their owner's unlink. #​839 by @​gaborbernat.
  • Fix a lock reporting a hold the OS had dropped after a signal handler raised during acquire or release. A release that a signal handler cuts short after it has started now completes before the error propagates. A handler that acquires the lock its own thread is releasing now gets RuntimeError instead of a hold that stays held. The singleton cache no longer hands out an is_singleton=True lock or a ReadWriteLock whose finalizer is running, which released the new holder's lock. A signal during os.fork() no longer leaves the other threads blocked in their next lock call, and a fork from another thread no longer waits for a ReadWriteLock acquire on a busy database. #​840 by @​gaborbernat.
  • Fix a lock on a relative path locking a file in the directory the process changed to while the lock waited, and leaving its marker behind on release after such a change. The path resolved when an acquisition starts stays in use until the hold ends. An is_singleton=True lookup no longer returns a cached lock whose relative path now resolves to another file; a held lock still matches the file it holds. A rename of the lock's directory during a hold no longer leaves the marker behind or reports a false lease compromise, and a waiter no longer creates a second lock file in a directory that was renamed away. #​841 by @​gaborbernat.
  • SoftReadWriteLock reaches its records through descriptors of <path>.rw and gen or holders opened without following symlinks. On Windows it holds those directories open and refuses a junction (a directory that points at another directory). A tree swapped in after an earlier acquire therefore cannot redirect them. Its heartbeat rewrites a holder record only when the name still leads to the file it created, and does not block on a FIFO (a named pipe). A heartbeat that finds <path>.rw replaced by a symlink or junction reports the hold lost instead of ending the heartbeat thread. A live lock object repeats the ownership check whenever the tree it opens is not the one it prepared. #​842 by @​gaborbernat.
  • Fix SoftFileLock, MarkerSoftFileLock and SoftFileLease removing or displacing a live holder's marker in five cases. ext4 gave a freed inode number to the next marker. A stalled FileLock removed its ENOSYS placeholder after a peer replaced it. A failed acquire cleaned up after a successor took the path. A stale break left the lock path empty while it checked the marker it had moved. A lifetime break judged a marker by a reused inode number. On Linux and macOS a stale marker now changes hands in one atomic exchange. On other platforms without one, except Windows, including NFS and SMB, the marker stays in place and waits for timeout or break_lock(). Restoring a marker no longer follows a symlink found under the break name. A holder that releases while a peer's exchange has its marker aside leaves a record no lock parses, so the put-back lands a marker that ages out. A lease heartbeat that finds another file at the lock path once, while a peer's break has its marker aside, waits for the next refresh before it reports a compromise. A contender that finds a dead breaker's marker puts back the marker that breaker left under its break name. A marker is the breaker's own only when it names the breaker's process on this host; the same process number on another host is a holder. A contender takes a stranded marker under a name of its own before it puts the marker back, so two contenders no longer reverse each other's exchange and remove the live holder's marker. A claim left behind by a failed put-back is retried on the next poll. #​843 by @​gaborbernat.
  • Canceling an AsyncReadWriteLock or AsyncSoftReadWriteLock acquire that waits for another process now stops the wait and raises the cancellation. It used to wait until that process released, or raise Timeout. A thread_local=True AsyncFileLock that threads with their own event loops share no longer deadlocks when one thread waits for the lock while another holds it. #​844 by @​gaborbernat.
  • SoftReadWriteLock refuses a commit that lands a whole retention window behind the log, so two committers stalled at adjacent generations can no longer admit a second writer. Its stale check samples the clock before it reads a holder record, so a pause between the two no longer counts as time the record stayed unchanged. #​845 by @​gaborbernat.
  • Fix a SoftFileLock contender evicting an empty marker after two seconds while its owner held the lock. The owner is a SoftFileLock before 3.22, which writes nothing into its marker, or a current one still writing its record. An empty marker now reads as held, and timeout, lifetime or break_lock() clears it. A contender that finds an empty marker a dead breaker left aside puts it back instead of removing it. #​846 by @​gaborbernat.
  • Fix ReadWriteLock on Windows acting on -journal and -wal files another account places beside its database: an acquire could fail with OperationalError, or SQLite could replay the journal and delete the file it names. The lock now reads the database directory's access control list. Where an account other than the locking account, SYSTEM and Administrators can add or remove names, SQLite opens a hard link inside a directory only those accounts can write. A filesystem without hard links raises OSError. #​854 by @​gaborbernat.
  • Fix SoftReadWriteLock subclasses sharing singleton instances with the base class or sibling subclasses. Each concrete class now keeps its own cache and construction guard, including after fork, while preserving cooperative class-definition keywords. #​855 by @​AryanRG.

PyPI release

Full Changelog

v4.2.0

Compare Source

Bug fixes
  • Fix StrictSoftFileLock raising SoftFileLockProtocolError on Windows when a contender read a claim whose owner was still finishing its unlink. #​829 by @​gaborbernat.

Performance
  • import filelock is about twice as fast: lock types other than FileLock load on first use. #​831 by @​gaborbernat.

🐍 PyPI release

📜 Full Changelog

v4.1.2

Compare Source

Bug fixes
  • Fix read-lock acquisition on SQLite versions older than 3.33.0 by using sqlite_master for the schema probe. #​827 by @​DawnofGenX.
  • Raise IsADirectoryError (or PermissionError on Windows) for a directory lock path regardless of its write permissions. #​822 by @​feiiiiii5.
  • Fix a forked child hanging at exit on PyPy when the parent forked while an AsyncReadWriteLock worker thread was between two operations. #​828 by @​gaborbernat.
  • Hash all cache keys in the lock filename recipe so short path-like keys stay in the chosen directory. The example also accepts path-derived surrogate escapes and works before the cache directory exists. #​824 by @​xiehuanyi.

PyPI release

Full Changelog

v4.1.1

Compare Source

Bug fixes
  • Avoid the macOS /dev/fd lookup implicated in a kernel panic by opening SQLite through a validated hard link. The database directory must be writable and support hard links; alias creation failure raises OSError. #​820 by @​gaborbernat.
  • Ignore non-ASCII PID or start-time fields and out-of-range PIDs in ReadWriteLock hard-link directory names so forged owners cannot abort acquisition. #​821 by @​dxbjavid.

PyPI release

Full Changelog

v4.1.0

Compare Source

Features
  • Import OwnerMode, CompromiseReason and has_fcntl from filelock. #​790 by @​gaborbernat.
  • AcquireReturnProxy is generic in the lock type, so with lock.acquire() as held: types held as the lock's own class. #​803 by @​gaborbernat.
  • A Timeout from a soft lock names a holder on another host or in another PID namespace, which no contender ever reclaims. #​815 by @​gaborbernat.
  • Every option given in seconds takes a Decimal or Fraction, as a file lock's timeout already did, and a read-write lock or lease refuses a bool or string one. #​815 by @​gaborbernat.

Bug fixes
  • is_lock_held_by_us and is_lock_held_by_us return False for a marker an earlier process with the same PID left behind. #​774 by @​lprnmns.
  • SoftFileLock removes its marker when writing it fails and closing the descriptor fails too, so the lock path no longer stays blocked. #​775 by @​harbinresearcher.
  • acquire and acquire no longer wait past timeout when poll_interval is longer than the time left. #​777 by @​feiiiiii5.
  • SoftReadWriteLock ignores a generation-log entry whose name is not 20 ASCII digits, which used to stop its heartbeat thread or delete real generations. #​778 by @​dxbjavid.
  • ReadWriteLock, SoftReadWriteLock and their async wrappers treat a inf timeout like -1 and raise ValueError for a blocking nan one. #​779 by @​darrenhuai.
  • ReadWriteLock and SoftReadWriteLock accept a timeout above TIMEOUT_MAX instead of raising OverflowError. #​780 by @​darrenhuai.
  • acquire raises ValueError for a blocking nan timeout or a poll_interval above TIMEOUT_MAX, and treats a inf timeout like -1. #​781 by @​gaborbernat.
  • SoftFileLock and MarkerSoftFileLock treat a marker cut before its final newline as malformed, so a crash-truncated record self-heals and a read mid-write no longer breaks a live lock. #​782 by @​gaborbernat.
  • UnixFileLock no longer deletes another process's live marker when it falls back to a soft lock on ENOSYS, and on macOS a lock path ending in a separator raises FileNotFoundError instead of retrying. #​785 by @​gaborbernat.
  • SoftFileLock and SoftFileLease put back a live successor's marker that a racing stale break moved aside, so a third contender no longer acquires beside the successor. #​786 by @​gaborbernat.
  • StrictSoftFileLock removes every claim a failed acquire published, counts an EEXIST link that landed as published, and no longer reports is_locked after a failed claim cleanup. #​787 by @​gaborbernat.
  • On Python 3.10 without the exceptiongroup backport, a release failure under the default context_error_policy no longer turns into ModuleNotFoundError; cleanup failures chain instead of grouping, and on_acquired is allowed. #​788 by @​gaborbernat.
  • AsyncReadWriteLock and AsyncSoftReadWriteLock drop a task's hold when a caller cancels it during a release that still completes, instead of blocking every later writer. #​789 by @​gaborbernat.
  • SoftFileLease releases a lease dropped while held, at garbage collection or interpreter exit, and raises ValueError for a heartbeat_interval above TIMEOUT_MAX. #​791 by @​gaborbernat.
  • StrictSoftFileLock judges an abandoned private record's age by the filesystem's clock, so a client clock ahead of an NFS server no longer aborts live publications. #​792 by @​gaborbernat.
  • BaseAsyncFileLock raises RuntimeError instead of CancelledError when its executor shuts down with the call still queued, and a waiter interrupted by anything else no longer wedges later calls. #​793 by @​gaborbernat.
  • Constructing or closing a second ReadWriteLock on a held database no longer drops the holder's lock, so other processes stay excluded. #​794 by @​gaborbernat.
  • SoftReadWriteLock no longer admits a second writer after <path>.rw is removed under a live instance, and flushes each snapshot before publishing it so a crash cannot leave an empty one that wedges every peer. #​795 by @​gaborbernat.
  • SoftFileLease reclaims a dead MarkerSoftFileLock owner, and expires a lease or a malformed soft marker after it stays unchanged on the contender's own monotonic clock, so clock skew cannot break it. #​796 by @​gaborbernat.
  • A soft lock marker written in a Linux container records its PID namespace with the hostname, so a sibling container that shares the hostname and volume no longer breaks a live lock. #​797 by @​gaborbernat.
  • SoftReadWriteLock.close() makes an acquire still waiting in another thread raise RuntimeError, where it used to take the lock on the closed instance and hold it until the process exited. #​798 by @​gaborbernat.
  • SoftReadWriteLock reads the head from gen/HEAD, so a client whose cached directory listing is more than 64 generations stale no longer takes an old generation for the head and forks the log. #​799 by @​gaborbernat.
  • When the garbage collector finalizes a held BaseAsyncFileLock, it releases on a loop running in another thread, or in place once no loop is left; the lifetime check and path resolution now run in the executor. #​800 by @​gaborbernat.
  • SoftReadWriteLock waits out a holder's own stale_threshold before evicting it, keys its singleton on the path its log sits beside, and no longer leaks ledger entries or the holder record of a failed acquire. #​801 by @​gaborbernat.
  • lock_descriptor raises ValueError for a blocking poll_interval above TIMEOUT_MAX up front, instead of OverflowError once the descriptor is contended. #​802 by @​sricharanreddycheruku.
  • BaseFileLock rejects a bool or string timeout, an out-of-range mode and a non-bool blocking set at any time, rejects unknown options on a singleton cache hit, and tracks an on_acquired reacquire. #​803 by @​gaborbernat.
  • StrictSoftFileLock raises SoftFileLockProtocolError naming a directory, symlink or exited soft-lock owner's marker at the lock path, and lock_path_occupant shows what blocks it. #​804 by @​gaborbernat.
  • ReadWriteLock raises ValueError for a WAL-mode database instead of disk I/O error, and its /dev/fd fallback links beside the database, so a lock off the TMPDIR filesystem no longer fails with EXDEV. #​805 by @​gaborbernat.
  • ReadWriteLock.release() from a thread that holds no read level raises RuntimeError instead of ending another thread's read lock and letting a writer in. #​806 by @​gaborbernat.
  • SoftFileLockLifetimeWarning derives from FutureWarning instead of DeprecationWarning, so Python shows it by default outside __main__. #​807 by @​gaborbernat.
  • SoftFileLock applies an explicit mode past the umask as UnixFileLock does, and reads a marker number spelled other than in ASCII digits, or a lease with an empty token, as malformed. #​807 by @​gaborbernat.
  • ReadWriteLock raises OSError when its database is unlinked or replaced while an acquisition waits, instead of taking a lock that no later opener sees. #​808 by @​gaborbernat.
  • On a thread-local synchronous lock, release with force=True and garbage collection release holds exited threads left, and a release() re-entered from a signal handler closes the descriptor once. #​810 by @​gaborbernat.
  • SoftFileLease records a lease_duration given as a float subclass, such as NumPy's, in a form every contender parses, so a live lease is no longer evicted as malformed. #​815 by @​gaborbernat.
  • StrictSoftFileLock raises SoftFileLockProtocolError for a file at the lock path it cannot parse once it stays unchanged for two seconds, instead of waiting on it forever. #​815 by @​gaborbernat.
  • A lock finalized at interpreter exit no longer hangs when a daemon thread stopped inside filelock's fork bookkeeping. #​815 by @​gaborbernat.
  • Setting BaseFileLock.timeout from a string emits a DeprecationWarning and from a bool raises TypeError; pass the number of seconds instead. #​815 by @​gaborbernat.
  • Every lock raises ValueError for a timeout too large for a float, and a singleton accepts a timeout that waits as long as the cached one, such as inf for -1. #​815 by @​gaborbernat.
  • On macOS, ReadWriteLock connects through a private hard link, so cycling a lock beside a holder no longer adds an open descriptor per connection. #​815 by @​gaborbernat.
  • SoftFileLock and SoftFileLease re-check a stale marker right before breaking it, so a marker recreated since the check is no longer moved aside for a third contender to take the path. #​815 by @​gaborbernat.
  • An acquire a signal handler starts while its thread is still acquiring the same lock raises RuntimeError, where it used to hang that thread or leave the lock held after the outer release. #​815 by @​gaborbernat.
  • A BaseAsyncFileLock singleton the garbage collector finalizes leaves the singleton cache first, so a new lock on the path waits for its release instead of re-entering a hold that release then drops. #​815 by @​gaborbernat.
  • A finalized thread-local BaseAsyncFileLock releases every thread's hold, including one on a daemon thread's event loop at interpreter exit, instead of leaving it held. #​815 by @​gaborbernat.
  • A soft lock in the host's PID namespace no longer breaks a live marker written from a container sharing the hostname while the kernel shows its owner running in another namespace under the recorded PID and start time. #​815 by @​gaborbernat.
  • SoftFileLock and its marker and lease variants no longer leave their marker behind when a signal handler interrupts a release; the retried release, or the next acquire on Windows, removes it. #​815 by @​gaborbernat.
  • SoftReadWriteLock raises ValueError for a heartbeat_interval above TIMEOUT_MAX, which killed its heartbeat thread, and an interrupted release still removes its record. #​815 by @​gaborbernat.
  • AsyncReadWriteLock releases only its own hold on a singleton it shares with synchronous users, where it used to end their read transaction too. #​815 by @​gaborbernat.

Documentation
  • The documentation's canonical link, og:url and sitemap entries point at the versioned page on Read the Docs instead of a domain-root URL that returns 404. #​813 by @​gaborbernat.

🐍 PyPI release

📜 Full Changelog

v4.0.12

Compare Source

Bug fixes
  • Fix read-lock acquisition on SQLite versions older than 3.33.0 by using sqlite_master for the schema probe. #​769 by @​Vikram12301.

PyPI release

Full Changelog

v4.0.11

Compare Source

Bug fixes
  • ReadWriteLock and AsyncReadWriteLock use a validated private hard link when /dev/fd has no entry for the database descriptor, supporting NetBSD's static descriptor directory beyond descriptor 63. The temporary location must share a filesystem with the database. The symlink refusal test accepts NetBSD's error wording by @​gaborbernat.

PyPI release

Full Changelog

v4.0.10

Compare Source

Bug fixes
  • Reusing a singleton AsyncFileLock with another loop, executor or run_in_executor, or a singleton SoftFileLease with another lease_duration, heartbeat_interval or on_compromise, now raises ValueError instead of returning the lock with its original options. #​765 by @​kokotatan.

PyPI release

Full Changelog

v4.0.9

Compare Source

Bug fixes
  • ReadWriteLock and AsyncReadWriteLock close the descriptor that checks the database path once SQLite has connected, so on PyPy a dropped lock leaves no descriptor open until garbage collection runs. #​763 by @​gaborbernat.

Security
  • ReadWriteLock and AsyncReadWriteLock refuse a symlink at the database path instead of following it, so a user who can create names in a shared lock directory cannot point the lock at another file (GHSA-j8f7-rjxc-mr56) by @​gaborbernat.

PyPI release

Full Changelog

v4.0.8

Compare Source

Bug fixes
  • ReadWriteLock.release() and SoftReadWriteLock.release() from a thread that does not hold the write lock now raise RuntimeError instead of dropping the holder's lock and letting a second writer in. #​761 by @​feiiiiii5.

PyPI release

Full Changelog

v4.0.7

Compare Source

Bug fixes
  • File locks now raise ValueError at construction when mode denies the owner read or write, such as mode=0o444, instead of failing on a later acquire and staying broken until someone deletes the lock file. #​760 by @​gaborbernat.

PyPI release

Full Changelog

v4.0.6

Compare Source

Bug fixes
  • Reject negative blocking timeouts other than -1 before reentrant ReadWriteLock and SoftReadWriteLock acquisition. Preserve unlimited waits and nonblocking acquisition. #​756 by @​feiiiiii5.

PyPI release

Full Changelog

v4.0.5

Compare Source

Bug fixes
  • Fix MarkerSoftFileLock acquisition and prevent contenders from evicting live protocol-2 owners after two seconds. Reclaim recognized records after owner death; preserve unknown contracts. #​751 by @​DawnofGenX.
  • Honor instance timeout and blocking settings in sync and async ReadWriteLock acquisition, including waits between tasks on one instance. Preserve explicit per-call overrides. #​752 by @​DawnofGenX.
  • Skip access-denial checks when the process can read mode-0o000 files. Keep mode-bit checks enabled for privileged processes on filesystems that support POSIX permissions. #​753 by @​pasmud.
  • Skip vanished StrictSoftFileLock claims after a read-permission retry expires. Recheck the directory before raising a protocol error so concurrent removal does not turn a stale claim listing into an acquisition failure. #​754 by @​januththedev.
  • Reject negative timeouts other than -1 in blocking AsyncReadWriteLock and AsyncSoftReadWriteLock acquisitions. Keep -1 as an unlimited wait and ignore timeouts when blocking=False. #​755 by @​pasmud.

PyPI release

Full Changelog

v4.0.4

Compare Source

Bug fixes
  • Hostnames that still differ after their first 253 escaped characters now publish distinct owners, so a soft lock no longer takes another such host's live holder for its own and reclaims its marker. #​748 by @​feiiiiii5.

PyPI release

Full Changelog

v4.0.3

Compare Source

Bug fixes
  • Importing filelock on CPython 3.10 or 3.11 no longer makes new threads fail with RuntimeError: Cannot install a trace function while another trace function is being installed under coverage or a debugger. filelock skips its fork-safety audit hook there, so forking from inside a thread's own lock-state transition no longer raises immediately on those versions. #​747 by @​gaborbernat.

PyPI release

Full Changelog

v4.0.2

Compare Source

Bug fixes
  • Concurrent acquire() and release() on a thread_local=False lock no longer leak the OS lock, close a descriptor twice, drop a lease token, or leave a false deadlock after a cross-thread release (#​744). #​745 by @​gaborbernat.
  • AsyncReadWriteLock and AsyncSoftReadWriteLock now give each asyncio task its own hold, so tasks sharing one instance no longer enter the write lock together. #​746 by @​gaborbernat.
  • Correct the async cache example to create its data directory and clarify automatic creation of lock-file parent directories. #​740 by @​agammann.

PyPI release

Full Changelog

v4.0.1

Compare Source

Bug fixes
  • poll_interval is now validated at construction, on the setter, and on acquire(): a negative, non-finite, or non-numeric value raises ValueError/TypeError immediately instead of failing inside time.sleep. #​739 by @​Pitchfork-and-Torch.

PyPI release

Full Changelog

v4.0.0

Compare Source

Features
  • SoftReadWriteLock exposes generation as a fencing token for the protected resource and reports a lost hold through on_compromise and compromise. #​738 by @​gaborbernat.

Bug fixes
  • The SoftReadWriteLock on-disk protocol is a generation log under <path>.rw, and a process running an earlier release does not see it: an old and a new participant on one lock path do not exclude each other. Stop every participant, upgrade them all, then restart them; the new code ignores leftover .state, .write and .readers/ files, and you can delete them. The filesystem must provide no-replace hard links, as it must for StrictSoftFileLock, so a runtime without os.link raises SoftFileLockProtocolError on acquire. Constructing a singleton again with a different on_compromise, or with poll_interval at or above stale_threshold, now raises ValueError. #​738 by @​gaborbernat.
  • SoftReadWriteLock no longer deadlocks when a holder dies on another host mid-transition, and release() no longer waits on a mutex a dead host left behind. The state mutex is gone. Each transition is one atomic snapshot commit, and liveness is a heartbeat nonce read on the observer's own clock rather than an mtime read against another host's. #​738 by @​gaborbernat.

PyPI release

Full Changelog


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: cloud-py-api/nc_py_api/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 5f19cd89-0bdf-49d8-8420-8cf99790ee7b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@renovate
renovate Bot force-pushed the renovate/filelock-4.x branch 2 times, most recently from 57e3d19 to 2fad156 Compare September 24, 2026 05:03
@renovate
renovate Bot force-pushed the renovate/filelock-4.x branch 6 times, most recently from e4b4f26 to a30e2ea Compare October 2, 2026 00:41
@renovate
renovate Bot force-pushed the renovate/filelock-4.x branch 4 times, most recently from 1c4b94d to aed37a4 Compare October 10, 2026 01:43
@renovate
renovate Bot force-pushed the renovate/filelock-4.x branch 5 times, most recently from 96daa21 to 5b3eb55 Compare October 18, 2026 09:51
@renovate
renovate Bot force-pushed the renovate/filelock-4.x branch from 5b3eb55 to c92749e Compare October 19, 2026 01:42
@renovate
renovate Bot force-pushed the renovate/filelock-4.x branch from c92749e to f5fd5f3 Compare October 19, 2026 06:07

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants