Skip to content

🔧 build(lint): pin simplint 0.12.2 - #930

Merged
gaborbernat merged 16 commits into
tox-dev:mainfrom
gaborbernat:build/bump-simplint-0.12.0
Nov 13, 2026
Merged

gaborbernat merged 16 commits into
tox-dev:mainfrom
gaborbernat:build/bump-simplint-0.12.0

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

This pins the simplint 0.12.2 hook for contributor and CI checks and resolves everything the newer rules report, so the lint job stays green on the new pin. The public API and lock behavior do not change. 🔧 simplint 0.12.2 no longer conflicts with Ruff's unnecessary-regular-expression-compile, so the Ruff ignore kept for that conflict is gone.

Lock internals

The new limit of 12 instance attributes per class caught four lock classes, and each now keeps related state together. BaseFileLock holds its validated settings as a single value. ReadWriteLock keeps its hold (level, mode, holding threads) in one object that also grants, nests and releases levels, and puts the SQLite connection's transaction and identity state next to the connection itself. SoftReadWriteLock builds participants from one factory that carries the shared log, ledger and files, and keeps the compromise callback together with the latest loss. FileLockContext keeps its fields as they are because they are public API, so it carries a line ignore. ♻️

The rest is automatic fixes (read-only module mappings, functools.wraps on wrappers, monotonic timers), definitions moved below their first users, and assertions added to checks that previously passed as long as nothing raised.

@gaborbernat gaborbernat added the skip news Internal change; exempt from the news fragment check label Nov 13, 2026
Comment thread src/filelock/_strict.py Dismissed
@gaborbernat
gaborbernat force-pushed the build/bump-simplint-0.12.0 branch from 3294800 to c4c5e1a Compare November 13, 2026 20:41
The parametrize list derived each seed's crash and stale-listing rates
through two single-value for clauses; a constant now holds the cases.
Each of these tests only ran the code under test and passed as long as
nothing raised. They now check the observable result: whether a writer
can get in, the hold's generation, the mock's call count.
The participant cached its own holder path next to the token and root
it is built from; deriving it keeps the participant within simplint's
attribute limit.
BaseFileLock copied each LockSettings field onto its own attribute; it
now keeps the settings object and reads the fields from it.
ReadWriteLock kept its level, mode and holder threads as separate
attributes, and the connection's transaction flag and identity beside
the connection holder. The hold now lives in _Hold, which owns the
grant, nest and leave steps, and the connection state in
_OwnedConnection.
The files, root, ledger and log only ever feed new participants, so a
partial of Participant holds them. The compromise callback and the
latest loss move together into _Losses.
While the spy is patched in, only the lease refresh calls lstat, so the
filter never skips and branch coverage fell to 99% on every Linux job.
@gaborbernat
gaborbernat force-pushed the build/bump-simplint-0.12.0 branch from 65d124c to 7f413f3 Compare November 13, 2026 22:31
@gaborbernat gaborbernat changed the title 🔧 build(lint): pin simplint 0.12.1 🔧 build(lint): pin simplint 0.12.2 Nov 13, 2026
@gaborbernat
gaborbernat merged commit 9c41f13 into tox-dev:main Nov 13, 2026
48 checks passed
@gaborbernat
gaborbernat deleted the build/bump-simplint-0.12.0 branch November 16, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news Internal change; exempt from the news fragment check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants