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
As specified on the quickstart.rst, one can use the del command to remove a table from a TOMLDocument. This has a faulty implementation when dealing with multi-tier tables. The internal data is deleted and the JSON result is as expected but the TOMLDocument will not render correctly afterword. The resulting TOML does not combine keys and will create 2 tables with the same name which causes TOML Parser Errors on re-read. The bug is more obscure than I first thought as it will not render 2 table headings if the immediate parent/previous table header is the same. However, if the previous table is not the same section, it will re-render the header rather than checking the entire TOMLDocument for the parent header.
Example
The example is here to illustrate an incorrect result and not for debate on if this should be done or not.
Imported pyproject.toml
[project]
name = "examplepkg"
[build-system]
requires = [
"setuptools",
"wheel"
]
build-backend = "setuptools.build_meta"
[project.optional-dependencies]
dev = [
"python-semantic-release"
]
As you can see the toml generated actually outputs 2 [project] sections as it dropped the tiered section and the internals but the result causes the pyproject.toml to be invalid because of 2 defined project sections.
The text was updated successfully, but these errors were encountered:
As specified on the
quickstart.rst
, one can use thedel
command to remove a table from aTOMLDocument
. This has a faulty implementation when dealing with multi-tier tables. The internal data is deleted and the JSON result is as expected but the TOMLDocument will not render correctly afterword. The resulting TOML does not combine keys and will create 2 tables with the same name which causes TOML Parser Errors on re-read. The bug is more obscure than I first thought as it will not render 2 table headings if the immediate parent/previous table header is the same. However, if the previous table is not the same section, it will re-render the header rather than checking the entireTOMLDocument
for the parent header.Example
The example is here to illustrate an incorrect result and not for debate on if this should be done or not.
Imported
pyproject.toml
Example code which creates invalid output
Expected Result
JSON output (expected)
TOML output (expected)
Actual Result
JSON output (actual)
Result: Matches Expected Result
TOML output (actual)
Result: Failure
As you can see the toml generated actually outputs 2
[project]
sections as it dropped the tiered section and the internals but the result causes thepyproject.toml
to be invalid because of 2 defined project sections.The text was updated successfully, but these errors were encountered: