You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression in 0.15.1: valid out-of-order child table raises KeyAlreadyPresent #571
Tomlkit 0.15.1 rejects a valid document when a table contains an out-of-order
child, its concrete parent is declared afterward, and another table separates a
later sibling child.
This is a regression: tomllib and Tomlkit 0.13.3, 0.14.0, and 0.15.0 all
accept the document.
Each header in the minimized example is necessary to trigger the failure. The
array-of-tables is not special: replacing [[tool.poetry.source]] with any
intervening table header also reproduces it, while removing the intervening
header makes it pass.
Regression boundary
Reproduced on Python 3.13.8 and 3.14.2:
stdlib tomllib: passes
Tomlkit 0.13.3: passes
Tomlkit 0.14.0: passes
Tomlkit 0.15.0: passes
Tomlkit 0.15.1 and current master: fail
Suspected root cause
The regression appears to come from the concrete+super validation added in #530 / commit d3c76f0.
When [tool.ruff.lint.b] is appended, the existing lint entry is represented
by OutOfOrderTableProxy, while the candidate is a Table. _validate_table_candidate() checks:
Activity
Accept a table extending an out-of-order child of an out-of-order table
Validate out-of-order table candidates against every fragment