Vendor a TOML v1.0.0 compatible TOML parser
See original GitHub issueWhat’s the problem this feature will solve?
Pip currently only supports TOML v0.5.0. Reading a pyproject.toml containing TOML v1.0.0-rc.1+ syntax will cause a failure, even if the unsupported syntax is in a section that pip doesn’t care about (e.g. [tool.*]
).
Some projects in the Python ecosystem are hesitant to support TOML v1.0.0 because pip does not. Meanwhile other projects are using Poetry and its v1.0.0-rc.1 compatible tomlkit for building packages, thus potentially creating pip incompatible builds without noticing an issue.
Describe the solution you’d like
Vendor a TOML v1.0.0 compatible TOML parser. I suggest my very own Tomli which, in addition to being v1.0.0 compatible, fixes many bugs present in the toml library, parses 2x as fast, and is much smaller with only 50% the amount of lines of code.
Alternative Solutions
Stick to a TOML v0.5.0 compatible parser. Perhaps mention in the docs that projects where pyproject.toml includes TOML v1.0.0-rc.1+ syntax are not supported.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:9 (9 by maintainers)
Pradyun meant he was working toward having
toml
release a TOML 1.0 compatible version, see uiri/toml#300.And yes, please do make a PR for the switch to
tomli
.FWIW, I think we should bump up to TOML 1.0.0 here, and update our standards to that.