Back to Explore

tox-dev/filelock

GitHub
10 updates · last 90 days1 watchersOpen source

Last release:

filelock is a platform-independent file locking library for Python. It provides a way for Python programs to coordinate access to files and avoid conflicts when multiple processes need the same file.

Project status

  • Actively maintained, with very recent upstream activity (last push 2026-07-18, and multiple new version updates in mid-July 2026).
  • Update cadence appears high right now (several updates released between 2026-07-03 and 2026-07-18, including patch updates on 07-16 and 07-17, and a minor on 07-18).

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • 3.31.0

    filelock 3.31.0 focuses on platform compatibility and correctness. It adds Termux/Android support and updates StrictSoftFileLock contention behavior by keeping the intent claim stable for the whole hold, preventing two processes from being treated as holders under heavy contention.

    BreakingFeatures
  • 3.30.3

    Release 3.30.3 focuses on documentation and UI polish, plus a targeted fix in the asyncio deadlock detection logic for AsyncFileLock and AsyncSoftFileLock. The asyncio change scopes the reentrant-deadlock registry to the owning asyncio task, addressing false-positive deadlock RuntimeErrors across tasks. The documentation updates improve table-of-contents behavior across font sizes and make Mermaid diagrams follow the active light/dark theme.

  • 3.30.2

    Release 3.30.2 focuses on correcting how file lock marker records are interpreted during stale lock recovery, and on clarifying strict lock lifetime behavior. The code changes ensure that markers using an unsupported mode are treated as belonging to a live owner so they are not evicted by age.

  • 3.30.1

    Version 3.30.1 includes fixes for strict locking behavior under NFSv3 stale filehandles, and for lease marker parsing when the stored lease duration is non-finite (nan/inf). It also adjusts the internal fork-reset protocol matching to align with how the method is provided on class objects.

  • 3.30.0

    filelock 3.30.0 introduces a major expansion of soft-lock capabilities, including strict soft locks and expiring leases, plus new API options for error-handling policies and hooks. The release also adds native descriptor locking utilities and significantly hardens async and SQLite related fork behavior. Overall, the change set is large (80 files) and includes new protocol-level marker formats and deeper internal refactors.

    Features
  • 3.29.7

    Release 3.29.7 focuses on improving deadlock detection for the asyncio-based locks and tightening marker and file writability handling. It updates the async lock acquisition flow to detect cross-instance reentrant deadlocks before entering the poll loop, and adjusts soft write-marker and util logic to avoid platform-specific stalls or incorrect acceptance.

    Breaking
  • 3.29.6

    This release focuses on concurrency and filesystem permission correctness. It serializes singleton lock construction to prevent a race, and it removes a dead mtime-based short circuit when checking whether a lock file is writable.

  • 3.29.5

    Release 3.29.5 focuses on making file lock acquisition and release more robust under concurrency, especially for the soft read/write lock implementation. It also tightens safety checks around symlinks and adds stricter validation for the lock lifetime setter, along with a change to how Unix lock files are handled after release.

    Breaking
  • 3.29.4

    Filelock 3.29.4 focuses on lock correctness on filesystems with coarse modification-time granularity and flaky heartbeat touch behavior. It verifies inode identity when breaking stale locks, and it prevents the read/write heartbeat thread from terminating on transient touch errors.

  • 3.29.3

    filelock 3.29.3 includes CI and release workflow adjustments, plus stricter parsing of lock holder PIDs to prevent invalid PIDs from being treated as alive. The code change centralizes PID parsing through _parse_lock_holder so malformed lock files are more consistently ignored and self-healed.