Repository navigation
[pre-commit.ci] pre-commit autoupdate - #696
Merged
Merged
Conversation
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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
updates: