Skip to content

Update dependency tomlkit to v0.15.1#189

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/tomlkit-0.x
Open

Update dependency tomlkit to v0.15.1#189
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/tomlkit-0.x

Conversation

@renovate

@renovate renovate Bot commented Aug 13, 2022

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
tomlkit ==0.11.1==0.15.1 age confidence

Release Notes

python-poetry/tomlkit (tomlkit)

v0.15.1

Compare Source

Changed
  • Speed up membership tests (key in ...) on Container, Table and InlineTable with native __contains__ implementations, avoiding the inherited MutableMapping round-trip through __getitem__ (which resolves the value and builds an exception on every absent key). (#​483)
  • Speed up parsing by making Source index-based: it now tracks an integer position over the input string instead of materializing a list of (index, char) tuples up front, so construction is O(1) and state save/restore no longer copies an iterator. (#​489)
  • Speed up parsing by scanning character runs in bulk: Source.advance_while/advance_until consume a whole run of whitespace, bare-key or number characters in a single pass over the input string instead of one inc() call per character. (#​490)
  • Speed up parsing of single-line strings by bulk-appending the run of ordinary characters up to the next delimiter, backslash or control character in one pass, instead of one character at a time. (#​491)
  • Speed up parsing by removing the internal TOMLChar wrapper: the parser now reads plain str characters from Source and detects end-of-input positionally, avoiding a per-character object construction and method dispatch. (#​492)
  • Speed up parsing by comparing StringType members by identity (is) instead of building a set on every is_basic/is_literal/is_singleline/is_multiline call, avoiding millions of enum hashes while parsing. (#​502)
  • Speed up merging super tables by merging in place instead of deep-copying the growing target on every merge, turning the parse of documents with many subtables under a shared super table (e.g. consecutive [a.b.c] / [a.b.d] headers) from O(n²) into O(n). (#​503)
  • Speed up membership tests (key in ...) on out-of-order tables with a native OutOfOrderTableProxy.__contains__, completing #​483 for the last mapping type that still inherited the slow MutableMapping mixin (which resolves the value and builds an exception on every absent key). (#​515)
  • Speed up parsing documents with many dotted keys or table headers sharing a prefix by validating out-of-order tables incrementally: each new fragment is merged into a cached validation container once, instead of re-merging (and deep-copying) every earlier fragment on each append, turning a super-cubic worst case into linear time (80 shared-prefix dotted keys: ~8 s → ~10 ms). (#​479)
  • Speed up parsing of arrays that close right after a value (e.g. the files = [...] blocks that dominate lock files): the parser no longer attempts to read a value while sitting on the closing ], which previously built an UnexpectedCharError just to discard it — and constructing that exception eagerly computes a line/column by scanning the whole document, making it O(document size) per such array. (#​517)
  • Speed up parsing of multiline strings by bulk-appending the run of ordinary characters — across raw line feeds and tabs — up to the next delimiter, backslash, carriage return or control character, instead of one character at a time. This extends to """/''' bodies the single-line fast path added in #​491; a \r still stops the scan so \r\n stays validated and byte-for-byte preserved. (#​518)
  • Speed up unwrap() (converting a parsed document to a plain dict) by resolving each key directly from the container's key map instead of iterating the inherited MutableMapping view, which rebuilt a SingleKey from the bare string for every key just to re-look-up the value. Out-of-order tables still resolve through their proxy, so their validation is unchanged. (#​521)
  • Speed up rendering (as_string() / dumps()) of inline tables with many keys by precomputing the last-key and last-deleted-element indices in a single pass, instead of rescanning the remaining body on every separator comma — turning an O(n²) render into O(n). (#​525)
  • Raise on malformed array element instead of dropping it, (#​527)
Fixed
  • Fix string() dropping a leading newline of a multiline string on round-trip: a value beginning with a newline is now rendered with an extra leading newline (the one the parser trims after the opening delimiter) so it survives re-parsing.
  • Fix invalid serialization with a duplicated comma when removing a non-edge element from a parsed inline table. (#​486)
  • Fix invalid serialization with a duplicated comma when appending or inserting into a comma-first formatted array. (#​499)
  • Fix ParseError when a sub-table extends the last element of an array of tables after an unrelated table. (#​261)
  • Fix unparseable serialization when adding a key to a dotted-key table inside an inline table. (#​500)
  • Fix a table replaced by a plain value being serialized inside the preceding table's body when other tables follow; the value now moves before the first table like other root-level values. (#​504)
  • Fix assigning a table over a dotted key (e.g. doc["a"] = {...} where a came from a.b = ...): the dotted prefix was duplicated onto the new [a] header, and the header then swallowed any sibling that follows it on round-trip. The replacement now renders as a plain table and, when needed, moves before the inline entries (values and dotted keys) it would otherwise capture. (#​513, #​524)
  • Restore dumps() rendering mapping-like wrappers around a parsed document (e.g. dotty_dict's Dotty) through their delegated as_string, preserving the original table order and layout instead of re-encoding through a plain dict — a 0.15.0 regression. (#​482)
  • Fix uncontrolled recursion when parsing deeply nested documents: crafted input could crash the process with a RecursionError. Values nested more than 100 levels deep and keys with more than 100 dotted fragments now raise ParseError. (#​459)
  • Fix comment() producing invalid TOML for a multiline string by prefixing every line with #, not just the first. (#​449)
  • Fix the separator comma being swallowed by a trailing comment when appending a key to a multiline inline table, leaving the new key without a separator so the result no longer round-trips. (#​512)
  • Fix a KeyAlreadyPresent error when parsing or accessing an out-of-order table whose array-of-tables elements are split across the table's parts. (#​505)
  • Out-of-order value-vs-table and dotted-key-vs-table redefinitions are now rejected at parse time instead of being silently accepted or raising only on access. The parser also detects when a non-dotted key is a prefix of an existing dotted key, matching the stdlib tomllib behaviour. (#​523)
  • Reject tables inserted into inline tables instead of serializing invalid TOML. (#​531)
  • Fix assigning an array of tables over a dotted key (e.g. doc["a"] = aot(...) where a came from a.b = ...): the new [[a]] header kept the dotted key's inline position and swallowed the following dotted sibling on round-trip. The array of tables now renders past the inline entries it would otherwise capture, mirroring the table fix for #​513. (#​542)
  • Fix a new top-level scalar being captured by a table rendered from a dotted key: appending a scalar after a dotted-key entry (e.g. a.b = 1) whose table had gained a [a.c]-style child placed the scalar inside that table's scope, silently re-nesting it on round-trip. Scalars now move before such an entry, like they do before regular tables. (#​543)
  • Fix invalid serialization with a duplicated [table] header when adding a key to an out-of-order table whose concrete header is declared after its sub-tables; the new key now lands in the existing concrete part instead of giving the header-less super part a second header. (#​545)
  • Fix a table's display name (its exact header spelling, including whitespace and quoting) being normalised when the table is assigned onto itself, e.g. doc[k] = doc[k] rewriting [keys .'a'.'c'] to [keys.a.'c']. (#​291)
  • Fix missing newlines when appending a key after a dotted inline table, including when the original document has no trailing newline. (#​533)
  • Preserve trailing whitespace when replacing a super table, including assigning it onto itself. (#​534)
  • Fix str() and repr() of out-of-order table proxies to show their merged values. (#​536)
  • Reject decimal integer literals that exceed Python's integer-string conversion limit instead of coercing them to infinity. (#​538)

v0.15.0

Compare Source

Changed
  • Update parser to support TOML spec v1.1.0. (#​456)

v0.14.0

Compare Source

Changed
  • Drop support for Python older than 3.9. Remove 3.8 from the CI matrix.
Added
  • Custom encoders can now receive _parent and _sort_keys parameters to enable proper encoding of nested structures. (#​429)
  • Add String.type property to get the string type. (#​443)

v0.13.3

Compare Source

Added
  • Add .item() method to array and tables to retrieve an item by key. (#​390)
Fixed
  • Fix missing newline when parsing a separated array of tables without trailing new line. (#​381)
  • Fix non-existing key error when deleting an item from an out-of-order table. (#​383)
  • Ensure newline is added between the plain values and the first table. (#​387)
  • Fix repeated whitespace when removing an array item. (#​405)
  • Fix invalid serialization after removing array item if the comma is on its own line. (#​408)
  • Fix serialization of a nested dotted key table. (#​411)
  • Refine the error message when use non-string as single key. (#​412)
  • Fix invalid serialization after overwriting a key of a out-of-order table. (#​414)

v0.13.2

Compare Source

Fixed
  • Fix deleting keys from an out-of-order table does not remove all table parts. (#​379)

v0.13.1

Compare Source

Fixed
  • Fix the Table.is_super_table() check for tables with dotted key as the only child. (#​374)
  • Count table as a super table if it has children and all children are either tables or arrays of tables. (#​377)

v0.13.0

Compare Source

Changed
  • Expect a tomlkit-specific error instead of TypeError from a custom encoder. (#​355)
  • Drop support for Python older than 3.8. Remove 3.7 from the CI matrix.
Fixed
  • Fix the incompatiblity with 3.13 because of the datetime.replace() change. (#​333)
  • Revert the change of parsing out-of-order tables. (#​347)
  • Keep the nested out-of-order table. (#​361)

v0.12.5

Compare Source

Fixed
  • Remove the extra minus sign added to the float value after calculation. (#​341)
  • Fix unexpected newline added after accessing the out-of-order table. (#​343)

v0.12.4

Compare Source

Fixed
  • Support | and |= operator for tables, and support + and += operator for arrays. (#​331)
  • Fix an index error when setting dotted keys in a table. (#​332)

v0.12.3

Compare Source

Fixed
  • Improve the performance when parsing a table with nested dotted keys. (#​193)
  • Keep the newlines when replacing a table. (#​323)

v0.12.2

Compare Source

Fixed
  • Fixed a bug that overwriting a sub table with a plain value raises an error. (#​313)
  • Correct the return type of integer division. (#​312)

v0.12.1

Compare Source

Fixed
  • Make float and int hashable.

v0.12.0

Compare Source

Added
  • Allow users to specify encoders for custom types. (#​296)
Fixed
  • Fix the incorrect sort when building a table with dotted keys.
  • Complete the methods required for integer and float items. (#​307)
  • Replace the deprecated usage of datetime.utcnow(). (#​308)
  • Minor performance improvements when iterating over the escape sequences. (#​304)

v0.11.8

Compare Source

Fixed
  • Remove the extra indentations added when parsing nested sub-tables. (#​256)
  • Ignore the CRLF immediately following a multiple basic string opening. (#​262)
  • Stringifying subtables and nested tables in arrays of tables. (#​283)
  • Messed table structure when building a table with dotted keys. (#​284)

v0.11.7

Compare Source

Fixed
  • Parse empty table name if it is quoted. (#​258)
  • Fix a bug that remove last element of an Inline Table leaves a comma. (#​259)
  • Parse datetime when it is followed by a space. (#​260)
  • Fix the unwrap() method for Container children values which sometimes returns an internal object if the table is an out-of-order table. (#​264)
  • Fix the wrong return type when doing arithmetic operations between integers and floats. (#​270)

v0.11.6

Compare Source

Fixed
  • Allow broader type for toml file path value (#​243)
  • Auto-determine if a table is a super table if not specified explicitly. (#​245)

v0.11.5

Compare Source

Fixed
  • Fix the type annotation of unwrap() and datetime parsing. (#​229)
  • Clear the existing table header when it is adding to another table. (#​230)
  • Fix a bug that escape chars are lost after concat with another string. (#​235)
  • Fix a rendering issue of tables inside arrays or inline tables. (#​236)

v0.11.4

Compare Source

Fixed
  • Fix a memory leak caused by lru_cache on methods. (#​227)

v0.11.3

Compare Source

Fixed
  • Fix a regression issue that copying an array results in extra None items. (#​221)
  • Fix a regression of array.add_line that it incorrectly adds a comma to non-value lines. (#​223)

v0.11.2

Compare Source

Fixed
  • Fix adding float to an integer value. (#​215)
  • Keep the end-of-array style when adding items to or removing items from an array. (#​213, #​216)
  • Fix a bug of redundant table header shown when removing children from a super table. (#​217)

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@vercel

vercel Bot commented Aug 13, 2022

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
elucidate-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 14, 2024 11:56am

@codecov-commenter

codecov-commenter commented Aug 13, 2022

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.31%. Comparing base (b56d674) to head (e71fe3c).

❗ Current head e71fe3c differs from pull request most recent head c43dbb0. Consider uploading reports for the commit c43dbb0 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #189   +/-   ##
=======================================
  Coverage   83.31%   83.31%           
=======================================
  Files          47       47           
  Lines        1139     1139           
=======================================
  Hits          949      949           
  Misses        190      190           
Flag Coverage Δ
backend 83.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from 9c40b5f to 3e5bf38 Compare August 14, 2022 14:38
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from 3e5bf38 to 524af9d Compare August 20, 2022 02:55
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from 524af9d to 0060ca2 Compare August 20, 2022 06:15
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from 0060ca2 to b7a732b Compare August 20, 2022 10:31
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from b7a732b to f7bd637 Compare September 10, 2022 13:34
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from f7bd637 to 0f0e596 Compare September 28, 2022 04:21
@renovate renovate Bot changed the title Update dependency tomlkit to v0.11.4 Update dependency tomlkit to v0.11.5 Sep 28, 2022
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from 0f0e596 to 4ffd35e Compare September 28, 2022 15:22
@renovate renovate Bot changed the title Update dependency tomlkit to v0.11.5 Update dependency tomlkit to v0.11.5 - autoclosed Oct 24, 2022
@renovate renovate Bot closed this Oct 24, 2022
@renovate
renovate Bot deleted the renovate/tomlkit-0.x branch October 24, 2022 14:56
@renovate renovate Bot changed the title Update dependency tomlkit to v0.11.5 - autoclosed Update dependency tomlkit to v0.11.5 Oct 24, 2022
@renovate renovate Bot reopened this Oct 24, 2022
@renovate
renovate Bot restored the renovate/tomlkit-0.x branch October 24, 2022 18:12
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from 4ffd35e to 9fc5bd3 Compare October 27, 2022 09:18
@renovate renovate Bot changed the title Update dependency tomlkit to v0.11.5 Update dependency tomlkit to v0.11.6 Oct 27, 2022
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from 9fc5bd3 to 3cf9912 Compare November 29, 2022 06:26
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from 3cf9912 to ce44e60 Compare December 2, 2022 10:43
@renovate renovate Bot changed the title chore(deps): update dependency tomlkit to v0.11.8 chore(deps): update dependency tomlkit to v0.12.1 Jul 30, 2023
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from 052f5e2 to 4935656 Compare July 30, 2023 05:26
@renovate renovate Bot changed the title chore(deps): update dependency tomlkit to v0.12.1 chore(deps): update dependency tomlkit to v0.12.2 Nov 2, 2023
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from 4935656 to a9e3d6f Compare November 2, 2023 14:14
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from a9e3d6f to 919e8ad Compare November 15, 2023 00:51
@renovate renovate Bot changed the title chore(deps): update dependency tomlkit to v0.12.2 chore(deps): update dependency tomlkit to v0.12.3 Nov 15, 2023
@renovate renovate Bot changed the title chore(deps): update dependency tomlkit to v0.12.3 chore(deps): update dependency tomlkit to v0.12.4 Feb 27, 2024
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from 919e8ad to e71fe3c Compare February 27, 2024 04:38
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from e71fe3c to c43dbb0 Compare May 8, 2024 16:51
@renovate renovate Bot changed the title chore(deps): update dependency tomlkit to v0.12.4 chore(deps): update dependency tomlkit to v0.12.5 May 8, 2024
@renovate renovate Bot changed the title chore(deps): update dependency tomlkit to v0.12.5 chore(deps): update dependency tomlkit to v0.13.0 Jul 10, 2024
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from c43dbb0 to 1660a01 Compare July 10, 2024 14:42
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from 1660a01 to b9fb85a Compare August 14, 2024 03:04
@renovate renovate Bot changed the title chore(deps): update dependency tomlkit to v0.13.0 chore(deps): update dependency tomlkit to v0.13.1 Aug 14, 2024
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from b9fb85a to ed9c5fe Compare August 14, 2024 11:55
@renovate renovate Bot changed the title chore(deps): update dependency tomlkit to v0.13.1 chore(deps): update dependency tomlkit to v0.13.2 Aug 14, 2024
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from ed9c5fe to 08ce344 Compare June 5, 2025 09:37
@renovate renovate Bot changed the title chore(deps): update dependency tomlkit to v0.13.2 chore(deps): update dependency tomlkit to v0.13.3 Jun 5, 2025
@renovate
renovate Bot force-pushed the renovate/tomlkit-0.x branch from 08ce344 to b32d2af Compare January 13, 2026 01:43
@renovate renovate Bot changed the title chore(deps): update dependency tomlkit to v0.13.3 chore(deps): update dependency tomlkit to v0.14.0 Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant