Debian Patches

Status for python-filelock/4.2.10-1

Patch Description Author Forwarded Bugs Origin Last update
backdate-stale-markers-in-race-tests.patch Backdate stale markers in two lock-break race tests
On ext4 (e.g. a pbuilder chroot), unlinking a file and immediately creating
a new one at the same path reuses the freed inode number, and the new file's
mtime falls into the same coarse timestamp tick. break_lock_file() identifies
the marker it judged stale by (mtime, inode), so it cannot tell the swapped-in
file from the original, and these two tests fail:

test_stale_break_racing_a_successor_admits_no_third_holder
test_break_lock_file_never_links_a_symlink_swapped_in_before_the_take

They pass on tmpfs, which does not reuse inode numbers. Backdate the stale
marker so the replacement is always distinguishable by mtime.
Sascha Steinbiss <satta@debian.org> no 2026-10-13
drop-python-sbom-build-hook.patch Drop python-sbom build hook python-sbom is not packaged in Debian and only generates an SBOM file.

diff --git a/pyproject.toml b/pyproject.toml
index 8bbb155..d6a4552 100644
Sascha Steinbiss <satta@debian.org> not-needed
pytest-mock-stop-workaround.patch Avoid pytest-mock < 3.16.1 mocker.stop() bug in a test test_soft_windows_unlink_gives_up_after_every_attempt_is_denied patches
unlink_path with new=mocker.create_autospec(...) and later calls
mocker.stop() on it. mocker.create_autospec registers the same object in
pytest-mock's cache without a patcher, and pytest-mock before 3.16.1 stops
the first cache entry matching the object, i.e. that patcher-less entry.
The patch is thus never undone, the following acquire cannot remove the
marker and times out. Fixed upstream in pytest-mock 3.16.1 (#621); Debian
has 3.15.1. Use mocker.patch(autospec=True) instead, which registers the
object only once and works with all versions.

diff --git a/tests/test_soft_stale.py b/tests/test_soft_stale.py
index 48a82ca..77280ba 100644
Sascha Steinbiss <satta@debian.org> not-needed

All known versions for source package 'python-filelock'

Links