-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
What'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.