Repository navigation
Releases
Releases · Mattie/snapclass
snapclass 0.2.1
snapclass 0.2.0
snapclass 0.1.4
Changes
- Default snapshot metadata writes now use in-place writes for better compatibility with active Windows app folders.
- Added opt-in
write_strategy=atomicpolicy throughStash,@snapclass,create_model,sync,Snapshot, andModel.Meta. - Kept atomic temp-file replacement available for callers that prefer complete-file swap behavior.
- Made write locks strategy-aware so in-place writes through a leaf symlink lock the resolved target, while atomic writes keep leaf-path replacement behavior.
- Expanded tests and README coverage for write strategy precedence, locking, and Windows-friendly write behavior.
Verification
- CI on
main: passed for Python 3.11, 3.12, 3.13, and package build. - Local
python.exe -m pytest: 360 passed. - Local
python -m build: built wheel and sdist forsnapclass 0.1.4. - Local
twine check: passed for both artifacts. - Clean wheel install smoke test: passed.
snapclass 0.1.3
What's Changed
- Add cooperative cross-process snapshot file locking with
snapshot.locked(reload=True). - Add
require_lock=Truefor models that should only save while their snapshot lock is held. - Use Windows/POSIX file locking with
.locksidecars, reload-before-mutate guidance, and save-under-lock docs. - Harden path handling around reserved
.locksnapshot names, sidecars, and collection scans.
Verification
- Local Python 3.12:
python -m pytestpassed, 350 tests. - Local build:
python -m buildproduced sdist and wheel for 0.1.3. - Local package check:
python -m twine checkpassed for both artifacts. - GitHub CI on
mainpassed for the merged commit.
snapclass 0.1.2
What's Changed
- Add snapclass lifecycle hooks for migration/live-state setup:
__snapclass_ready__(self, *, snapshot)after snapshot attachment and setup.__snapclass_loaded__(self, *, snapshot, path)after file data is applied.
- Suppress autosave/reload behavior while lifecycle hooks run.
- Wrap lifecycle hook failures in
SnapclassErrorwith hook name and path context when available. - Document the hook contract in the packaged snapclass fluency skill.
Migration Notes
- Hooks are intended for transient/live state setup and post-load rebuilds.
- Hook code should be idempotent and should not mutate fields used by the snapshot pattern.
- Sidecars may be read inside hooks; sidecar writes should happen after hooks return.