Releases: usethis-python/yamltrip
Releases · usethis-python/yamltrip
0.5.0
Immutable
release. Only release title and notes can be modified.
Features
append(),insert(),extend_list(), andsync()now handle flow sequences (e.g.[a, b, c]), which previously raisedPatchError. They fall back to replacing the sequence value, including recursive detection of flow sequences nested inside list elements.- Added
NodeTypeError(PatchError, TypeError)to the error hierarchy. Sequence-mutating operations (append,insert,extend_list,remove_from_list) now raiseNodeTypeErrorinstead of generic errors when the target node is not a sequence.
0.4.0
Immutable
release. Only release title and notes can be modified.
Features
- Added
Document.insert()andEditor.insert()for inserting an item at a specific position in a sequence. Uses Pythonlist.insert()semantics (negative indices count from end, out-of-range clamps). - Added
Document.get()andEditor.get()for non-raising value access. This returns a default (defaults toNone) when the path doesn't exist, similar todict.get(). - Added
Document.sync()andEditor.sync()that diffs the current value at a path against a desired value and applies the minimal set of patches. Supports recursive mapping diffing andSequenceMatcher-based list diffing to preserve comments and formatting on unchanged elements.
Internal
- Introduced
OpInnerenum in Rust to support local ops (likeinsert_at) alongside yamlpatch-delegated operations. - Extracted
KeyParttype alias to_types.py.
0.3.0
Immutable
release. Only release title and notes can be modified.
Features
replaceandupsertnow accept dicts and lists as values, not just scalars. Complex values are serialized to block-style YAML and spliced in via string surgery, bypassing yamlpatch's scalar-only limitation.- Added
rootproperty toDocumentandEditoras a convenience fordoc[()].
Internal
- Added cargo-fmt and clippy pre-commit hooks, aligned with CI.
- Simplified complex-replace internals to match yamlpatch behavior (removed quote-aware colon finding and inline comment preservation).
Documentation
- Fixed usethis badge path in README.
0.2.0
Immutable
release. Only release title and notes can be modified.
Features
- Non-finite floats (NaN, Inf, -Inf) now round-trip. Previously, reading a YAML
.nan/.inf/-.infvalue and writing it back raisedValueError.
Packaging
- Added
License :: OSI Approved :: MIT Licensetrove classifier to pyproject.toml.
Documentation
- Line-ending normalization (LF on output regardless of input) moved from "Limitations" to "Design Decisions" in the README.
Internal
- Added cargo-deny license compliance checking.
- Extended cargo-deny to also check security advisories against the RustSec database.
0.1.0
Initial release. yamltrip is a round-tripping YAML library for Python.