Closed wimglenn closed 1 year ago
@cjw296 It turned out to be much cleaner and simpler modifying parsers.py
to use importlib. And it still works on 3.6 this way.
When are you looking for a release? ASAP?
Wherever it’s ready. This is for an app, so I don’t mind to lock my requirements txt directly to the git hash in the meantime.
I would like to use configurator with a TOML file in Python 3.11, but lose that 3rd-party
toml
dependency, since Python 3.11+ hastomllib
.The current provider is not compliant with the TOML spec and does not roundtrip:
For Python < 3.11, may I recommend to move to
tomli
, which is what stdlibtomllib
was based upon. Many existing projects usetomli
(e.g.pip
,build
,pytest
,mypy
,black
,flit
,coverage
,setuptools-scm
,cibuildwheel
). According to PEP 680, the projectuiri/toml
was rejected because it's not actively maintained, does not support TOML 1.0.0 and has a number of known bugs.Unfortunately the abstractions in configurator made it a little complicated to integrate
tomli
/tomllib
, because the TOML specification requires the input to be UTF-8.tomli
implements this requirement by forcing the user to use binary mode "b" when reading the file, then does the decoding. I've tried my best to handle TOML files in a correct way, without drastic refactoring.