Whole file
python-poetry/tomlkit
The author described this change as “raise on malformed array element instead of dropping it (#527)”. It counts as a record because the check below fails on the code as it stood at 11e22aefc and passes on d548e18b7, with nothing else changed between the two runs.
Projectpython-poetry/tomlkit
Fix saved2026-06-23
Sharing licenceMIT · LICENSE
Change size+3 −6
What the code was meant to do, written into the code itself as a save note
raise on malformed array element instead of dropping it (#527)
The change
| 665 | 665 | # exception eagerly computes a line/column, which scans the whole | |
| 666 | 666 | # source. On a large file with many arrays this is a big, pure waste. | |
| 667 | 667 | if not prev_value and self._current != "]": | |
| 668 | - | try: | |
| 669 | - | elems.append(self._parse_value()) | |
| 670 | - | prev_value = True | |
| 671 | - | continue | |
| 672 | - | except UnexpectedCharError: | |
| 673 | - | pass | |
| 668 | + | elems.append(self._parse_value()) | |
| 669 | + | prev_value = True | |
| 670 | + | continue | |
| 674 | 671 | ||
| 675 | 672 | # consume comma | |
| 676 | 673 | if prev_value and self._current == ",": |
The check that tells the two apart
fail→pass·tests/test_parser.py::test_array_with_malformed_element_raises
Check file tests/test_parser.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it11e22aefccd8069a90ae75d20613b9b1068754a1
Broken version dated2026-06-23
Moduletomlkit.parser
Units changedParser
Fingerprint48ea14fe66501114
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in python-poetry/tomlkit
- 2026-07-15Fix top-level scalar captured by a table rendered from a dotted key (#550)
- 2026-07-14Fix array of tables replacing a dotted key swallowing the next sibling (#542) (#549)
- 2026-07-14fix: avoid duplicate table header when adding a key to an out-of-order table (#545)
- 2026-06-23fix: keep newline after dotted inline table (#533)
- 2026-06-23fix: reject out-of-order concrete+super table redefinitions at parse time (#530)
- 2026-06-23Fix ParseError when a sub-table extends an array of tables out of order (#498)