chore(deps): bump filelock from 4.2.1 to 4.3.0 in /tests in the pip group across 1 directory
Bumps the pip group with 1 update in the /tests directory: filelock.
Updates filelock from 4.2.1 to 4.3.0
Release notes
Sourced from filelock's releases.
4.3.0
Features
- On Windows,
release_with_timeoutlimits the caller's wait for release. If it raisesReleasePendingError, callwaiton the exception from any thread for the result. On POSIX, release is synchronous (#1107) by@gaborbernat. (#1100)Bug fixes
lock_descriptorraisesTypeErrorunlessblockingis abool(#969) by@feiiiiii5and@gaborbernat.- On POSIX filesystems with atomic exchange,
SoftFileLockrestores a live marker after an interrupted exchange and removes its own unfinished marker during cleanup (#1080) by@gaborbernat. (#993)- Unix soft fallback markers exclude group and other writes even on filesystems without atomic exchange (#1057) by
@gaborbernat. (#994)SoftFileLock,MarkerSoftFileLockandSoftFileLeaseremove empty markers after a signal interrupts marker creation or stale-marker replacement (#1049) by@gaborbernat. (#996)- Unix locks select the soft fallback per resolved path, including after a directory change. The lock keeps its Unix type and supports
pid,is_lock_held_by_us,break_lock()andlifetimeduring fallback (#1057) by@gaborbernat. (#1000)- On POSIX,
ReadWriteLockandAsyncReadWriteLockraiseRuntimeErrorin detected subinterpreters, includingInterpreterPoolExecutorworkers and mod_wsgi or uWSGI subinterpreters. Use the main interpreter or a separate process. Detection on embedded CPython 3.11 requires_xxsubinterpretersorctypesaccess to the interpreter C API (#1106) by@gaborbernat. (#1003)- On Windows,
SoftFileLocktreats a symlink as an occupied marker and leaves its target untouched (#1049) by@gaborbernat. (#1009)SoftFileLockandSoftFileLeaseclean up markers and descriptors across interrupted acquires and releases. POSIX unlink errors propagate, with a retry after close on filesystems that require it. Retryreleaseif a timeout interrupts restoration of a displaced marker (#1062) by@gaborbernat. (#1014)- A singleton shared by relative and absolute paths refuses acquisition if a directory change redirects its stored lock path (#1098) by
@gaborbernat. (#1018)ReadWriteLockraisesRuntimeErrorif a directory change redirects a singleton's cached database path (#1058) by@gaborbernat. (#1019)SoftFileLock,MarkerSoftFileLockandSoftFileLeaseremove their pending recovery marker even if another process replaces the break name during rollback (#1082) by@gaborbernat. (#1025)- Single-threaded SQLite read and write lock waits allow Python signal handlers to run. Waiting writers keep their place ahead of new readers (#1105) by
@gaborbernat. (#1027)- On POSIX,
SoftFileLocktries to leave a one-byte recovery record if a full filesystem prevents marker cleanup. With atomic exchange, a later caller can reclaim it when space is available (#1101) by@Yshuroand@gaborbernat. (#1029)- Windows soft-lock recovery no longer reads
proc/self/ns/pidfrom the drive root when identifying a marker's host (#1036) by@gaborbernat.- On Unix filesystems without
flock, waiters can reclaim an interrupted acquire's recovery marker after two seconds if atomic exchange and space for the marker are available (#1057) by@gaborbernat. (#1046)SoftReadWriteLockrecreates a missing generation directory during read or write acquisition, even if a holder record survives (#1103) by@gaborbernat. (#1102)- On POSIX, soft locks close the inspection descriptor if opening an existing marker is interrupted (#1113) by
@gaborbernat. (#1111)- Unix locks can use the soft fallback when the directory denies the temporary probe and atomic exchange is unavailable. If native locking works there, new lock files exclude group and other writes by default. Set
mode=0o660for group sharing. The probe removes its temporary name before testing and closes its descriptor on interruption (#1115) by@gaborbernat. (#1112)ReadWriteLockprevents database redirection in shared, non-sticky directories by placing its hard link in a fresh private directory. Cleanup recognizes older link layouts (#1096) by@gaborbernat.AsyncFileLock,AsyncReadWriteLockandAsyncSoftReadWriteLockdiscard executor calls whose submission failed. A queued release can no longer drop a later task's lock (#986) by@gaborbernat.SoftReadWriteLockscans up to 256 orphan holder records and 256 temporary files per sweep, resuming where it stopped. Each listing removes up to 256 obsolete generations. The lock raises a protocol error above 65,536 generation entries (#1097) by@gaborbernat.SoftReadWriteLockuses fixed-size fingerprints to bound memory use per holder record during cleanup (#1097) by@gaborbernat.StrictSoftFileLockbacks off above 1,024 public claims and raisesSoftFileLockProtocolErrorabove 16,380 directory entries before publication. Sentinel cleanup counts only the lock's own records (#1040) by@gaborbernat.StrictSoftFileLockcreates sentinels and claims without group or other write permissions. Runchmod go-won older writable sentinels. On Linux, a contender waits iffs.protected_hardlinksprevents it from probing another account's claim (#985) by@gaborbernat.Timeoutandlock_path_occupantnow escape control characters and other bytes outside printable non-space ASCII in recorded hostnames (#1090) by@radhika1314and@gaborbernat.- A
SoftReadWriteLockheartbeat checks the holder token before writing. If another file replaces the record and reuses its inode, the lock reports a lost hold (#982) by@gaborbernat.- A
SoftReadWriteLockwaiter paused paststale_thresholdgets a fresh token so cleanup of its old record cannot remove the new hold (#1097) by@gaborbernat.- A failed acquire rolls back its own nesting level. Releasing that level from a hook or signal handler raises
RuntimeError. Balanced nested holds still work. Retrying an interrupted release on a shared instance affects only the original hold. An indefinite acquire raisesRuntimeErrorif a signal handler returns holding the same path through another instance (#1060) by@gaborbernat.- A forked child with its parent's numeric PID in another Linux PID namespace preserves the parent's locks and private SQLite database link (#1075) by
@gaborbernat.- After an ambiguous Unix unlock error,
FileLockrejects reentrant acquires until an explicitrelease()retry resolves the hold (#1098) by@gaborbernat.- Async reader/writer wrappers sharing a lock serve waiting writers in arrival order, ahead of new readers. Returning writers rejoin at the back (#1073) by
@gaborbernat.- At interpreter exit,
SoftReadWriteLockkeeps holds owned by live daemon threads.AsyncSoftReadWriteLockkeeps holds whose event loops are still running (#1048) by@gaborbernat.- Canceling an
AsyncFileLockrelease still decrements the lock counter after the active transition finishes (#1051) by@gaborbernat.- Closing an async reader/writer wrapper stops its contended acquires on the next poll, even if another singleton wrapper is waiting (#1073) by
@gaborbernat.- Closing an async reader/writer wrapper wakes tasks waiting on that wrapper even if another singleton wrapper holds the lock (#1073) by
@gaborbernat.- During shutdown, another thread's
release(force=True)preserves the main thread's thread-local hold, including duringatexitcallbacks (#1098) by@gaborbernat.- If an async reader/writer acquire succeeds during close, it waits for close to finish. A successful close releases the hold and the acquire raises the closed error. If close fails while the lock is held, the task receives the hold (#1073) by
@gaborbernat.- In a sticky Unix directory such as
/tmp,ReadWriteLockraisesPermissionErrorunless the caller or directory owner owns the database (#970) by@radhika1314and@gaborbernat.- In sticky directories, locks reject files and protocol directories whose ownership is ambiguous because Linux reports the overflow UID (#977) by
@gaborbernat.
... (truncated)
Changelog
Sourced from filelock's changelog.
########### Changelog ###########
.. towncrier-draft-entries:: Unreleased
.. towncrier release notes start
.. _release-4-3-3:
4.3.3 (2026-12-04)
.. _release-4-3-3-fixed:
Fixed
- 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 (:pr:1150) by :user:vinilpolepalli.- On POSIX, if an exhausted disk quota prevents :class:
~filelock.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 (:pr:1147) by :user:darrenhuaiand :user:gaborbernat.- Singleton locks and :class:
~filelock.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 (:pr:1139) by :user:feiiiiii5, :user:gaborbernatand :user:LemonCondor... _release-4-3-3-security:
Security
- On Unix, when creating the lock file is denied, :class:
~filelock.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 (:pr:1144) by :user:gaborbernat... _release-4-3-3-performance:
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 (:pr:1152) by :user:gaborbernat... _release-4-3-2:
... (truncated)
Commits
54e61earelease 4.3.0f213ea2♻️ refactor(api): document lock types and share marker and proxy logic (#1122)2a5a975♻️ refactor: group locks by backend (#1121)61470e9🧪 test: allow time to acquire a free lock (#1120)7c9bc7b🔒 fix(unix): refuse planted hard links for on_acquired callbacks (#1118)59676b6📝 docs: shorten unreleased changelog entries (#1119)eb97f60📝 docs: classify the subinterpreter fix as a patch (#1117)f7c8403⚡ perf(soft-rw): stage HEAD in one directory (#1114)b41d591✨ feat(strict): bound the wait for Windows release (#1107)8963c4b🐛 fix(async): close without the default executor (#1110)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore <dependency name> major versionwill close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)@dependabot ignore <dependency name> minor versionwill close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)@dependabot ignore <dependency name>will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)@dependabot unignore <dependency name>will remove all of the ignore conditions of the specified dependency@dependabot unignore <dependency name> <ignore condition>will remove the ignore condition of the specified dependency and ignore conditions
You can disable automated security fix PRs for this repo from the Security Alerts page.
Summary by cubic
Bumps filelock from 4.2.1 to 4.3.0 in the /tests pip group and updates the pinned hashes in tests/requirements.txt. 4.3.0 adds Windows release-with-timeout support and fixes several soft-lock cleanup and recovery edge cases.