Skip to content

Fix out-of-order super-table ordering when separated by AoT - #702

Open
jeff-grimes-pplx wants to merge 2 commits into
python-poetry:masterfrom
jeff-grimes-pplx:fix/out-of-order-table-after-aot
Open

jeff-grimes-pplx wants to merge 2 commits into
python-poetry:masterfrom
jeff-grimes-pplx:fix/out-of-order-table-after-aot

Conversation

@jeff-grimes-pplx

Copy link
Copy Markdown

Summary

  • Fixes a round-trip section-reordering bug where two sub-tables of the same super-table (such as [tool.poetry] and [tool.other]) separated by an Array of Tables ([[plugins]]) were merged in-place before [[plugins]] instead of being wrapped in OutOfOrderTableProxy.
  • Container._raw_append() previously checked if item.is_table() and key is not None: when appending to self._table_keys, which excluded AoT items (isinstance(item, (Table, AoT))).
  • Adds a regression test test_string_output_order_is_preserved_for_out_of_order_tables_separated_by_aot in tests/test_toml_document.py.

Fixes #409.

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