In the latest release 0.15.0, tomlkit now throws an invalid control character exception for /r (carriage return) as a character in a file during parsing. This is problematic when the toml file is written or created on Windows where newlines are CRLFs (/r/n) instead of just a linux newline (/n).
This behavior was not existent in v0.13.0.
I use tomlkit within python-semantic-release and I found this bug during testing on my windows specific test environment with python 3.14 which pulls in the 0.15.0 version as opposed to windows running python 3.8 (which pulls in 0.13.0).
Pipeline failure logs:
InvalidControlChar('Control characters (codes less than 0x1f and 0x7f) are not allowed in comments, use \\u000d instead at line 43 col 0'
In the latest release 0.15.0, tomlkit now throws an invalid control character exception for
/r(carriage return) as a character in a file during parsing. This is problematic when the toml file is written or created on Windows where newlines are CRLFs (/r/n) instead of just a linux newline (/n).This behavior was not existent in v0.13.0.
I use tomlkit within python-semantic-release and I found this bug during testing on my windows specific test environment with python 3.14 which pulls in the 0.15.0 version as opposed to windows running python 3.8 (which pulls in 0.13.0).
Pipeline failure logs: