Mercurial > hgrepos > Python > libs > ConfigMix
changeset 653:211288645f02
For better TOML compatibility open TOML files with encoding=""
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 19 May 2022 21:17:39 +0200 |
| parents | 64cf6710c0db |
| children | 0d6673d06c2c |
| files | CHANGES.txt configmix/toml.py |
| diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Fri May 13 19:01:25 2022 +0200 +++ b/CHANGES.txt Thu May 19 21:17:39 2022 +0200 @@ -22,6 +22,9 @@ For better consistency: use `.getvarl_s()` instead of `.getvarl()` in the implementation of `__len__()` in jailed configurations. +- **[bugfix]** + For better TOML compatibility open TOML files with ``encoding=""``. + 0.20.5 (2022-03-07) ~~~~~~~~~~~~~~~~~~~
--- a/configmix/toml.py Fri May 13 19:01:25 2022 +0200 +++ b/configmix/toml.py Thu May 19 21:17:39 2022 +0200 @@ -34,5 +34,6 @@ encoded. """ - with io.open(u2fs(filename), mode="rt", encoding=encoding) as tfp: + with io.open( + u2fs(filename), mode="rt", encoding=encoding, newline="") as tfp: return toml.loads(tfp.read(), _dict=DictImpl)
