You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
[v0.14.0] — 2026-08-14
Added
YAML Schema Language — define custom schemas as YAML files with a rules list mapping regex patterns to YAML types (null/bool/int/ float/str), plus an optional extends base schema. Registered via register_schema(name, schema_yaml) and used as YAML(schema=name).
Inline dict schema — the schema parameter of YAML(), parse(), parse_file(), parse_all_docs(), safe_load(), and safe_loads()
accepts an inline dict, serialized and registered automatically.
Community Plugins — CustomType base class with can_parse/from_yaml/to_yaml/validate methods; register via register_type() (imperative or decorator). Custom types handle tagged
scalars on load and Python objects on dump.
Built-in plugins — !timestamp (maps to datetime) and !set
registered by default in pyrs_yaml/plugins/.
Changed
Schema resolution is pluggable — YamlSchema enum refactored into a SchemaResolver trait + Schema enum with a global SchemaRegistry
pre-loaded with the four built-in schemas (failsafe, json, core, yaml1.1). Custom schemas register via the registry; built-in Core keeps
its zero-cost match dispatch.
node_to_pyobject and direct_dump check registered CustomTypes —
tagged scalars convert via from_yaml() on load; matching Python objects
serialize via to_yaml() on dump.
Fixed
Quoted scalars always load as strings — implicit type resolution now
applies only to plain scalars (YAML 1.2): safe_load('"true"') returns the
string "true", not True. The serializer keeps negative numbers
round-tripping through the document (to_yaml) path.
Lone-quote keys round-trip — mapping keys that are a single ' or "
are emitted as quoted scalars instead of unparseable YAML.
Empty collections emit {}/[] — dumping empty mappings/sequences no
longer yields an empty document that re-parses as None.
Changed
get() is literal-key only — YamlDocument.get() no longer guesses
JSONPath for keys containing . or [; every key is treated as a
top-level mapping key, consistent with __getitem__/__setitem__.
Path access stays available via find()/node().