In general, tomllib is part of the standard library starting with Python 3.11, and the tomli package is a compatible version for lower Python versions. tomli_w is the version of the package with writing capabilities, and doesn't seem to have this issue.
However, I'm not super familiar with toml parsing so if there are other good reasons to stick with toml for writing, or if there are better alternatives, we can do that. tomlkit is another option as it supports round-tripping https://github.com/sdispater/tomlkit.
toml has a strange bug where its dumps() turns strings into arrays, leading to things like
in the log output, instead of the expected
In general, tomllib is part of the standard library starting with Python 3.11, and the tomli package is a compatible version for lower Python versions. tomli_w is the version of the package with writing capabilities, and doesn't seem to have this issue.
However, I'm not super familiar with toml parsing so if there are other good reasons to stick with
toml
for writing, or if there are better alternatives, we can do that.tomlkit
is another option as it supports round-tripping https://github.com/sdispater/tomlkit.