Skip to content

v0.5.0

Latest

Choose a tag to compare

@github-actions github-actions released this 28 May 18:18

Breaking release implementing Ktav specification 0.5.0.

Breaking

  • Typed markers :i and :f removed. Numbers, booleans, and null
    are inferred from the scalar's lexical form (spec §§ 3.6, 5.2).
    port: 8080 now yields int(8080); use port:: 8080 to keep a String.
  • Comments use ## (line-start only). A single # byte is content —
    color: #FF0000 is a valid string value.
  • Inline compounds {k: v, …} / [i, …] are now valid (spec § 5.8).
    The InlineNonEmptyCompound error is no longer emitted by the parser.

Added

  • ktav.emit_canonical(obj) — emit the normalised (spec § 5.9)
    byte-deterministic canonical form of a Python value.
  • Number literal grammar — hex (0x), octal (0o), binary (0b),
    decimal, and underscore separators; i64 overflow falls back to String.
  • Eight escape sequences in inline scalars (spec § 3.7):
    \\, \,, \}, \], \{, \[, \n, \r.

Changed

  • License: MITMIT OR Apache-2.0. Added LICENSE-APACHE;
    renamed LICENSELICENSE-MIT.
  • Spec submodule pinned to v0.5.0.
  • Picked up ktav 0.5.0.