Addendum for PEP 722 to use TOML

Quoting PEP 518, “The pytoml TOML parser is ~300 lines of pure Python code, so being outside the standard library didn’t count heavily against it.”

In other languages, you would not have bootstrapping problems so you could use any TOML library (Home · toml-lang/toml Wiki · GitHub). Realistically, I think having a dependency on an external library could only be a practical problem for a C program. GitHub - brglng/libtoml: Very tiny TOML parser in C is <2000 LOC so it would not be a large burden to drop it into your source tree, as people often (unfortunately) do with C dependencies.

For launchers specifically, note that implementing a launcher requires an installer like pip, and every installer, pip or else, already needs to have some TOML parser available since it must be able to parse the build backend in an sdist.

2 Likes

Here is the new discussion based on the current rewrite: PEP 723: Embedding pyproject.toml in single-file scripts

2 Likes

New thread: PEP 723: Embedding pyproject.toml in single-file scripts