Skip to content

refactor: replace _filelock with zerodep filelock module#8

Merged
Oaklight merged 1 commit intomasterfrom
refactor/zerodep-filelock
Apr 1, 2026
Merged

refactor: replace _filelock with zerodep filelock module#8
Oaklight merged 1 commit intomasterfrom
refactor/zerodep-filelock

Conversation

@Oaklight
Copy link
Copy Markdown
Owner

@Oaklight Oaklight commented Apr 1, 2026

Summary

Replace the old _filelock.py (no-op on Windows) with the zerodep filelock module which provides real cross-platform locking:

  • Before: Windows silently skipped all locking (graceful degradation)
  • After: Windows uses msvcrt.locking() for actual file locking

Changes:

  • Add src/weilink/filelock.py (deployed via zerodep add filelock)
  • Remove src/weilink/_filelock.py
  • Update imports in client.py, test_filelock.py, test_cross_process.py

Test plan

  • pytest tests/test_filelock.py tests/test_cross_process.py — 16 passed
  • Tests no longer skip on Windows (skipif removed)

- Deploy zerodep filelock (cross-platform: fcntl + msvcrt)
- Remove old _filelock.py (was no-op on Windows)
- Update imports in client.py and tests
@Oaklight Oaklight merged commit 01fa128 into master Apr 1, 2026
7 checks passed
@Oaklight Oaklight deleted the refactor/zerodep-filelock branch April 1, 2026 07:38
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