pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/textproc/py-tomlkit



Module Name:    pkgsrc
Committed By:   adam
Date:           Tue Nov 24 16:25:37 UTC 2026

Modified Files:
        pkgsrc/textproc/py-tomlkit: Makefile distinfo

Log Message:
py-tomlkit: updated to 0.15.3

0.15.3 - 2026-11-24

Changed

- Speed up looking up and replacing keys in tables: string lookups no longer build a temporary key, and replacing an existing value no longer scans every key in the table, which made updating many 
keys of a large table quadratic.
- Speed up repeated array appends by keeping existing indexes instead of rebuilding them.
- Speed up creating string values and keys, e.g. when building a document from Python data and dumping it: strings are escaped in one pass instead of per character, and the escape and bare-key 
character sets are built once.
- `comment()`, `Item.comment()` and `Array.add_line(..., comment=...)` now raise `ValueError` for control characters that TOML forbids in comments (anything but tab, plus `DEL`), including a bare 
carriage return; `comment()` still accepts LF and CRLF line breaks. Previously such comments were written out and produced a document that could not be parsed back.
- `date()` now raises `ValueError` when given a datetime string such as `"1979-05-13T12:34:56"` instead of returning a datetime.
- `Array.sort()` now reorders the serialized values too, keeping the array's formatting and comments in place; previously `list.sort()` only reordered the Python list, so `dumps()` still wrote the 
old order.

Fixed

- `dumps(..., sort_keys=True)` now sorts the keys of a parsed document recursively, matching the behavior on a plain `dict`; previously only the top-level keys were sorted while nested tables, inline 
tables, arrays of tables and inline tables inside an array kept their original order.
- Allow `Table.setdefault()` and `InlineTable.setdefault()` to retrieve existing values without supplying a default, matching document and mapping behavior.
- Fix `item()` and `dumps()` writing a `datetime` whose UTC offset is not a whole number of minutes (e.g. the historical LMT offsets `zoneinfo` gives, such as `-00:44:30`) as invalid TOML like 
`1900-01-01T12:00:00Z:30`, which no parser accepts. Such a value is now written as the same instant in UTC; this also covers `DateTime.replace()` and `astimezone()`.
- Allow `DateTime.astimezone()` to use the local timezone when no timezone argument is supplied, matching `datetime.datetime`.
- Arithmetic and `replace()` results for `Integer`, `Float`, `String`, `DateTime`, `Date` and `Time` no longer share the original item's `Trivia`, so changing the result's comment or indentation no 
longer rewrites the item still stored in the document.
- Fix `round()` on a `Float` without `ndigits` returning a `Float` (e.g. `2.0`) instead of an `Integer`, matching `round()` on a plain `float`.
- Fix a regression in 0.15.1 where `string(..., multiline=True, escape=False)` added an extra newline to a value starting with a newline, making it impossible to write such a raw string verbatim; 
with `escape=False` the value is now used as given again.
- Preserve single-line literal quotes when replacing a table field with a plain string, falling back to basic quoting when the value requires escaping.
- Fix invalid output after deleting the last key under a dotted key inside an inline table; the emptied table now renders as `b = {}`.
- Fix valid TOML being rejected as a duplicate when an out-of-order table header extends a table built from several dotted keys, e.g. `[a]` with `b.c = 1` and `b.d = 2`, then `[a.b.e]` after another 
table.
- Fix an `AttributeError` when a table is defined out of order under an indented header nested four or more levels deep, e.g. ` [a.b.c.d]` then `[a.b.c]`.
- Fix an out-of-order table being moved when it is separated from its sibling by an array of tables (e.g. `[tool.poetry]`, `[[plugins]]`, `[tool.other]`), so the document no longer round-trips 
unchanged.
- Fix `update()` on an out-of-order table dropping sibling keys stored in its other fragments when one of the updated keys appears in a later fragment.
- Fix deleting, popping or replacing a key that was newly added to an out-of-order table.
- Fix `TOMLDocument.value` and comparisons keeping only the last fragment of an array of tables split by other tables; all entries are now included, matching `unwrap()`.
- Fix assigning plain dicts to a slice of an array of tables (e.g. `doc["a"][:1] = [{"x": 4}]`) producing invalid output and leaving `unwrap()` and `json.dumps()` out of sync; an extended slice of 
the wrong length now raises before changing the document.
- Assigning a value that is not a table to an item or slice of an array of tables now raises `ValueError` before changing the document.
- Fix a `RecursionError` when parsing a dotted key at the maximum nesting depth followed by another key under the same prefix; `Container`, `Table` and `InlineTable` now implement `__deepcopy__`, and 
errors while assembling tables are reported as `ParseError`.
- Custom encoders registered with `register_encoder()` now receive only the `_parent` and `_sort_keys` keyword arguments they declare (or both when they accept `**kwargs`); previously an encoder 
declaring `_parent` but not `_sort_keys` failed with `TypeError`, and one declaring only `_sort_keys` never received it.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 pkgsrc/textproc/py-tomlkit/Makefile
cvs rdiff -u -r1.27 -r1.28 pkgsrc/textproc/py-tomlkit/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/py-tomlkit/Makefile
diff -u pkgsrc/textproc/py-tomlkit/Makefile:1.29 pkgsrc/textproc/py-tomlkit/Makefile:1.30
--- pkgsrc/textproc/py-tomlkit/Makefile:1.29    Sun Oct 18 14:53:41 2026
+++ pkgsrc/textproc/py-tomlkit/Makefile Tue Nov 24 16:25:37 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.29 2026/10/18 14:53:41 wiz Exp $
+# $NetBSD: Makefile,v 1.30 2026/11/24 16:25:37 adam Exp $
 
-DISTNAME=      tomlkit-0.15.2
+DISTNAME=      tomlkit-0.15.3
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    textproc python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=t/tomlkit/}

Index: pkgsrc/textproc/py-tomlkit/distinfo
diff -u pkgsrc/textproc/py-tomlkit/distinfo:1.27 pkgsrc/textproc/py-tomlkit/distinfo:1.28
--- pkgsrc/textproc/py-tomlkit/distinfo:1.27    Sun Oct 18 14:53:41 2026
+++ pkgsrc/textproc/py-tomlkit/distinfo Tue Nov 24 16:25:37 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.27 2026/10/18 14:53:41 wiz Exp $
+$NetBSD: distinfo,v 1.28 2026/11/24 16:25:37 adam Exp $
 
-BLAKE2s (tomlkit-0.15.2.tar.gz) = 0790ab294e31ec10d0ea9bf47f261efcb9f5b91bd6c48b0068ef31edc38e6129
-SHA512 (tomlkit-0.15.2.tar.gz) = 9b566b30d7e5c21bbfd6b2b0002b2bf668628401f6596f0df73747efc170e93fb9e0b2e9304cedcc28bd7a8776e09ab9fc5c9425fb55b68773db39251277cd52
-Size (tomlkit-0.15.2.tar.gz) = 190522 bytes
+BLAKE2s (tomlkit-0.15.3.tar.gz) = 104f14e08bf72e12547f31f53320a96339c0897be0bd113ba42270906697edbc
+SHA512 (tomlkit-0.15.3.tar.gz) = 11d2733cb451927d11d1ae4b62628f234999b0fee73576a4650805e6aebe2aef78ccd83e972584966bd93db7325d4de148ecae77cbdfd550281998f3656aafcb
+Size (tomlkit-0.15.3.tar.gz) = 204435 bytes



Home | Main Index | Thread Index | Old Index