Skip to content

[pre-commit.ci] pre-commit autoupdate - #696

Merged
gaborbernat merged 1 commit into
mainfrom
pre-commit-ci-update-config
Aug 3, 2026
Merged

gaborbernat merged 1 commit into
mainfrom
pre-commit-ci-update-config

Conversation

@pre-commit-ci

@pre-commit-ci pre-commit-ci Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.16.0 → v0.16.1](astral-sh/ruff-pre-commit@v0.16.0...v0.16.1)
- [github.com/zizmorcore/zizmor-pre-commit: v1.28.0 → v1.29.0](zizmorcore/zizmor-pre-commit@v1.28.0...v1.29.0)

@gaborbernat gaborbernat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gaborbernat
gaborbernat merged commit df67bf7 into main Aug 3, 2026
90 of 93 checks passed
@gaborbernat
gaborbernat deleted the pre-commit-ci-update-config branch August 3, 2026 22:15
gaborbernat added a commit that referenced this pull request Aug 3, 2026
`test_strict_soft_record_finalization_close_and_unlink_failures_group`
failed on graalpy3.11 in [the check run for
#696](https://github.com/tox-dev/filelock/actions/runs/30834396829/job/91755907386)
with a bare `PermissionError: [Errno 13] unlink denied`, where it
expects that error grouped with an injected close failure. A
`_HeartbeatThread` exception surfaced in the same test's teardown.
`mocker.patch("filelock._strict.os.close", ...)` resolves
`filelock._strict.os` to the `os` module, so the replacement covers
`os.close` for every thread in the process. The test keyed its fault to
call order, and a soft-rw heartbeat thread still winding down called
`os.close` first and took it. The private close then succeeded, so
finalization had only the unlink error left to report.

Four injections keyed to call order now key to the descriptor they
target, captured from `_open_relative` for the private publication
record and from `_open_sentinel` for the sentinel. Unrelated closes pass
through. `test_strict_soft_sentinel_inspection_and_close_failure_group`
counted `os.fstat` calls for the same reason and moves to the same key;
the record read inside `_open_sentinel` runs before the capture, so
`_acquire`'s inspection is still the first stat to fail.

#695 fixed this class of flake for an `os.open` injection by keying it
to the lock file's path. Running both files alongside a background
thread that opens and closes temporary descriptors fails all four cases
on `main` and passes all four here.
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.

1 participant