Skip to content

Releases: DazzleLib/dazzle-preservelib

v0.8.1 - Richer disk-space errors (InsufficientSpaceError.source)

Choose a tag to compare

@djdarcy djdarcy released this 23 Jun 18:07
v0.8.1
b4272bd

dazzle-preservelib 0.8.1 -- richer disk-space errors

A small additive patch on the 0.8.0 functional release.

Added

  • InsufficientSpaceError.source -- the error now carries the where-FROM of the operation, not just the destination, so a handler can report both ends ("not enough room at DEST to copy FROM SRC"). The field defaults to None and never displaces destination, so existing code (including the preserve CLI's except ... as e: e.destination) is unaffected. When the source is known, it is surfaced in the message too. copy_operation / move_operation populate it from the operation's source base or the common parent of the source files.

This closes an enrichment that was discussed during the 0.8.0 design and deferred; nothing else changes.

Installation

pip install --upgrade dazzle-preservelib

Compatibility

Fully backward compatible with 0.8.0. No public symbol removed or renamed; the only change is an optional new field on one exception.

v0.8.0 - First Functional Release (L3 extraction complete)

Choose a tag to compare

@djdarcy djdarcy released this 23 Jun 17:46
v0.8.0
767440e

dazzle-preservelib 0.8.0 -- first functional release

dazzle-preservelib is Layer 3 of the DazzleLib stack: the file-preservation library behind the preserve CLI. It owns the operation manifest (creation, sequential numbering, lineage, verification) and the COPY / MOVE / VERIFY / RESTORE operations -- copying and moving files with path-preservation, hash verification, conflict-aware destination scanning, and reversible operation tracking.

This is the first functional release. The library was lifted out of the preserve tool's embedded preservelib and re-grounded on the lower layers of the stack, so the OS mechanics now have a single home instead of three drifting copies.

What 0.8.0 delivers

A real layered library, not a vendored copy. The intrinsic mechanics are delegated down to the stack instead of reimplemented: filesystem operations, link create/detect/read/remove, metadata collect/apply, and hashing go to dazzle-filekit (L1); the .dazzlelink record bridge goes to dazzle-linklib (L2) via the optional [dazzlelink] extra. What stays at L3 is the preserve policy -- the manifest schema, link-handling decisions, destination conflict resolution, and disk-space strategy.

Manifest lifecycle. PreserveManifest (schema v3 with DAG lineage), plus the read side (find_available_manifests, now .preserve/-aware) and the write side (next_manifest_path -- sequential numbering with second-operation migration, and a predict-without-mutating mode for read-only callers) and describe_manifest for a quick summary.

Verified drop-in for the preserve CLI. The preserve tool now consumes this library, and its full test suite runs green against it -- the extraction changed where the code lives, not what it does. A consumer-contract test locks the exact submodule surface the CLI imports so it cannot silently regress.

Conservation-checked. Every delegation was audited at the function-body level before the embedded implementation was removed, and the public surface is guarded by an import canary (docs/api-stability.md).

Installation

pip install dazzle-preservelib

With the optional .dazzlelink record bridge:

pip install dazzle-preservelib[dazzlelink]

Dependencies

  • dazzle-lib (B) -- protocols, payload types, the DazzleError root.
  • dazzle-filekit (L1) -- the OS mechanics: links, metadata, hashing, disk-space.
  • dazzle-linklib (L2) -- the .dazzlelink record, via the optional [dazzlelink] extra (a clear named error if absent, never a silent fallback).

Version history

This release continues the preserve lineage and supersedes the earlier 0.4.0-snapshot and 0.7.3-embedded copies. None of the 0.8.0 pre-release iterations were published; 0.8.0 is the first release on PyPI.

Platform support

Platform Status
Windows Tested (junctions, hard links, NTFS metadata)
Linux / macOS Expected to work (POSIX symlinks, hard links) via dazzle-filekit

Requirements

Python >= 3.9. License: MIT.