pypi / tomlkit
tomlkit
What changed in tomlkit 0.15, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-29.
15 breaking1 security1 new APIs and options1 performance1 behavior and defaults25 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inittomlkit 0.1544 changes
Breaking changes 15
Rejects array slice assignment before mutating values.
Rejects trailing characters in key_value() rather than accepting them.
Rejects special float literals that are not lowercase.
Rejects surrogate code points in Unicode escapes, non-hexadecimal escape digits, tabs in bare keys, and malformed array-of-tables headers.
Renders timezone-aware times as local times without an offset.
Malformed array elements now raise an error instead of being dropped.
Tab characters in bare keys are rejected.
Rejects comments containing line breaks in Item.comment and add_line.
Rejects overlong decimal integers instead of coercing them to infinity.
Float is no longer treated as a sequence.
Out-of-order concrete and super table redefinitions are rejected during parsing.
Surrogate code points in \U Unicode escapes are rejected.
Rejects invalid table redefinitions, including redefinitions after a parent header and out-of-order concrete and super-table redefinitions.
Inserting tables into inline tables is rejected.
Non-hexadecimal digits in \u and \U escapes are rejected.
Security 1
Limits parser nesting depth so deeply nested input no longer crashes with RecursionError.
New APIs and options 1
Adds native containment support to Container, Table, InlineTable, and OutOfOrderTableProxy.
Performance 1
Renders inline tables in O(n) instead of O(n²).
Behavior and default changes 1
Updated to TOML specification v1.1, changing which TOML features tomlkit supports.
Fixes and other changes 25
Renders an emptied array of tables as an empty array.
Compares Bool items by value.
Preserves fold when subtracting datetimes and when unwrapping a datetime or time.
Fixes separator placement and comma handling when appending to or removing elements from inline tables, including tables with trailing comments.
Fixes corrupt output when adding dotted keys, inserting elements, or rendering inline tables with comments; also rejects tables inserted into inline tables.
Preserves underscores when creating integers from strings.
Preserves inline table key order in item() and preserves unwrap() key order after a value is replaced.
Escapes content appended to a String via __add__.
Adds the standard-library fold argument to Time and DateTime.
An array-of-tables header missing its second closing bracket is rejected.
Inserting into a comma-first array no longer produces a doubled comma.
A newline after a dotted inline table is preserved.
Adding to a dotted key inside an inline table no longer corrupts the rendered output.
dumps() again delegates to as_string for non-Mapping wrappers.
Removing a middle inline table element no longer produces a duplicated comma.
Inline table separators are placed after values rather than trailing comments, and appending no longer corrupts separator placement.
Returns a single key for a single-element list.
Every line of a multiline comment is prefixed with # when rendered.
Out-of-order table proxies represent merged values, merge array-of-tables fragments, and avoid duplicate headers when adding a key.
Fixes parsing and rendering of out-of-order tables, including sub-tables extending arrays of tables and merged array-of-tables fragments.
Preserves the leading newline of a multiline string built with string().
Table display names are preserved on self-assignment.
Replacing a dotted key with a table no longer duplicates prefixes or captures siblings, and top-level scalars are not captured by the rendered table.
Fixed a parser hang.
The sort_keys option is now honored for parsed TOML documents.