classification
Title: Provide a toml module in the standard library
Type: enhancement Stage:
Components: Library (Lib) Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: VA, brett.cannon, dstufft, eschwartz, mcepl, mgorny, njs, pradyunsg, xtreak
Priority: normal Keywords:

Created on 2020-03-25 06:54 by mgorny, last changed 2021-09-08 19:33 by brett.cannon.

Messages (8)
msg364979 - (view) Author: Michał Górny (mgorny) * Date: 2020-03-25 06:54
PEP 518 uses the TOML format to specify build system requirements.  AFAIU this means that all new build systems will require a TOML parser.  Could you consider adding one to the standard library to reduce the number of chicken-egg problems?

The referenced PEP states that 'pytoml TOML parser is ~300 lines of pure Python code', so I don't think integrating it would be a large maintenance cost.

[1] https://www.python.org/dev/peps/pep-0518/
msg364983 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-03-25 07:15
Relevant python-dev discussion : https://mail.python.org/pipermail/python-dev/2019-May/157405.html . The format has still not reached 1.0. Issue to track the 1.0 release candidate : https://github.com/toml-lang/toml/issues/698
msg365000 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2020-03-25 16:53
The plan is to start discussing adding a TOML parser once the spec reaches 1.0 (which we will know about as one of the pip contributors also manages TOML).
msg373879 - (view) Author: Va (VA) Date: 2020-07-18 07:23
1.0.0-rc.1 is out by now: https://github.com/toml-lang/toml/blob/master/CHANGELOG.md
msg387807 - (view) Author: Michał Górny (mgorny) * Date: 2021-02-28 09:53
It seems that the spec has reached 1.0.0:

> 1.0.0 / 2021-01-11

I guess that there are still ~2 months left to do this before 3.10 reaches beta.
msg387892 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2021-03-02 01:11
We will see if anyone has enough time to get this done between now and May for 3.10, but discussions have been started with some folks to propose something for the stdlib.
msg401071 - (view) Author: Michał Górny (mgorny) * Date: 2021-09-05 06:19
Is there any progress happening?  FWIU the common "toml" module on pypi has been discontinued now, projects are switching to yet another one and this is exactly the kind of problem a built-in module would have avoided.
msg401421 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2021-09-08 19:33
No progress as I've been swamped with higher-priority things and the bigger discussion about how we want to manage the stdlib going forward has not started yet (once again, not had the time to start that).
History
Date User Action Args
2021-09-08 19:33:19brett.cannonsetmessages: + msg401421
2021-09-05 06:19:14mgornysetmessages: + msg401071
2021-03-03 05:39:58eschwartzsetnosy: + eschwartz
2021-03-02 01:11:41brett.cannonsetmessages: + msg387892
2021-02-28 09:53:51mgornysetmessages: + msg387807
2021-01-02 20:28:34brett.cannonsetversions: - Python 3.9, Python 3.10
2021-01-02 14:01:58mceplsetnosy: + mcepl
2020-07-18 07:23:11VAsetnosy: + VA

messages: + msg373879
versions: + Python 3.10
2020-03-25 18:24:08xtreaksetnosy: + pradyunsg
2020-03-25 16:53:21brett.cannonsetmessages: + msg365000
2020-03-25 07:15:57xtreaksetnosy: + xtreak
messages: + msg364983
2020-03-25 06:54:21mgornycreate