Skip to content

fix filelock on windows#1

Open
chitinlabs wants to merge 2 commits into
ZhuLinsen:mainfrom
chitinlabs:fix/cache-windows-filelock
Open

fix filelock on windows#1
chitinlabs wants to merge 2 commits into
ZhuLinsen:mainfrom
chitinlabs:fix/cache-windows-filelock

Conversation

@chitinlabs
Copy link
Copy Markdown

No description provided.

@ZhuLinsen
Copy link
Copy Markdown
Owner

Thanks for the Windows compatibility fix. Replacing fcntl with a cross-platform lock is the right direction, but I would not merge this PR as-is.

Please address these before merge:

  1. Restore .gitignore

    The PR deletes the entire .gitignore. That would make local artifacts, test caches, build outputs, databases, reports, and especially .env files easy to commit accidentally. This is unrelated to the filelock fix and should be reverted.

  2. Sync dependency declarations

    pyproject.toml adds filelock>=3.12, but requirements.txt still omits it. If requirements.txt remains a supported install path, importing alphaevo.data.cache will fail in that environment.

  3. Preserve lock-file cleanup on exceptions

    The new _file_lock implementation cleans up the .lock file only after the with lock: block completes normally. If code inside the lock raises, the lock should still be released by FileLock, but the best-effort lock_path.unlink() cleanup is skipped. Please wrap the yield in try/finally so the old cleanup behavior is preserved.

The core code change is small and useful; after those fixes, this should be much safer to merge.

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.

2 participants