https://pypi.org/project/tomlkit/ is a style-preserving TOML parser, which makes it a much better fit for pip's needs and can be a better UX when we (I hope) adopt TOML as a new, preferred, configuration format.
Pipenv also plans to switch to TOMLkit, but IIRC it has some issues on Python 2. Nothing serious (related to a couple of backport dependencies), but some work is required.
Thanks for the info @uranusjr! :)
Should I start work on this?
Sure!
thank you!! feel free to assign me on the issue. I am going to add a draft pr soon!
A PR work in progress https://github.com/pypa/pip/pull/6460 will be back to it tomorrow.
One of our vendored dependencies -- pep517 has switched to using toml
(not pytoml
or tomlkit
). We might want to consider switching to that.
toml
is a good choice IMO for its minimal feature surface. tomlkit
is nice but adds unnecessary bloat for features pip is unlikely to need in the foreseeable future.
+1 for toml
. The main advantage of tomlkit
is that it preserves formatting, which isn't something we need right now. Let's wait until we need that feature before picking the bigger library.
Updated the issue title, to better reflect the main goal here. :)
FWIW, looking at pytoml -> toml; there doesn't seem to be any difference in API -- it should be a pretty simple switch for us.
https://github.com/pypa/pip/pull/6460 should this be reopened?
@auvipy Since the decision seems to be using toml instead of tomlkit, it is probably simpler to open a new PR for that.
OK
pep517 switched, so we're supposed to be vendoring toml anyway. And it looks like switching to toml will be pretty simple for now.
Most helpful comment
+1 for
toml
. The main advantage oftomlkit
is that it preserves formatting, which isn't something we need right now. Let's wait until we need that feature before picking the bigger library.