Mercurial > hgrepos > Python > libs > ConfigMix
comparison configmix/toml.py @ 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 | f454889e41fa |
| children | 0d6673d06c2c |
comparison
equal
deleted
inserted
replaced
| 652:64cf6710c0db | 653:211288645f02 |
|---|---|
| 32 | 32 |
| 33 .. note:: The TOML standard requires that all TOML files are UTF-8 | 33 .. note:: The TOML standard requires that all TOML files are UTF-8 |
| 34 encoded. | 34 encoded. |
| 35 | 35 |
| 36 """ | 36 """ |
| 37 with io.open(u2fs(filename), mode="rt", encoding=encoding) as tfp: | 37 with io.open( |
| 38 u2fs(filename), mode="rt", encoding=encoding, newline="") as tfp: | |
| 38 return toml.loads(tfp.read(), _dict=DictImpl) | 39 return toml.loads(tfp.read(), _dict=DictImpl) |
