Repository navigation
v0.11.0
Pre-release
Pre-release
A minor bump under the beta rule: a new public option, a denial-of-service
fix and new error codes. vendor/omnist-spec moves from v0.22.0-beta to
v0.27.0-beta (v0.23 to v0.27). Python was the last port without the spec's
alias rules; the divergence ledger's DIV-3 closes with this release.
read_yaml/Doc.from_yamltakemax_alias_expansion(default 50, at
most 10 000) andmax_expanded_slots(default 1 000 000, at most
10 000 000). The anchor/alias graph is composed, measured in one iterative
pass and only then constructed, so a "billion laughs" input is refused in
milliseconds before any alias is expanded. Every mapping and sequence,
anchored or not, the root and inline merge sources included, is a candidate
(D-18); a merge sequence is a carrier, anchored or not (D-18a); an input with
an alias or merge key whose total expansion is over the size cap is refused
(D-22), an alias-free input never is (the cliff is deliberate). New codes
document.limit.alias-expansionanddocument.limit.expanded-size, path
$, raised asDocumentError. Options are validated: a non-intis a
TypeError, a value outside1 .. ceilingaValueError(so0raises, as in omnist-j; the TypeScript, Go and Rust
ports read0as "use the default"). The CLI, the
registry andDoc.from_formatuse the defaults. Seedocs/formats/yaml.md.- Behaviour changes to documents that used to read. Input with an
expansion factor over 50 (for example a mapping that merges a block of more
than 148 keys and writes one key of its own, or a 100-key block aliased 100
times at the root) is now refused; raisemax_alias_expansionfor such a
file. A self-referential anchor isdocument.limit.alias-expansion(it was an
uncoded "cycle detected", or silently accepted fora: &a {<<: *a}). - Malformed merges are
parse.codec-syntaxat the node's line and column
(<<: 1,<<: [1],<<: [[{a: 1}]],<<: *sover scalars), before any
limit is counted.<<: [](and<<: *sover an
empty sequence) is a well-formed carrier that merges nothing and is accepted
(v0.27.0-beta). A container used as a mapping key is counted like a value (the
spec is silent; PyYAML refuses the unhashable key later, so only the reported
error differs). - A redefined anchor now reads (the latest definition applies, as in
YAML 1.2); PyYAML alone refused it asparse.codec-syntax. - Runner: E-32's
line:colplaceholder, the alias vectors run with their
declared maxima through the library, andnormalize/prune/extract/
parse_schemacompare canonical text byte for byte, trailing newline
included. The vendored suite is 338 vectors; the pin changes were otherwise already satisfied (BOM and invalid
UTF-8, E-27, codec positions, OML-26/27/28, canonical comparison).