question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vendor a TOML v1.0.0 compatible TOML parser

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
uranusjrcommented, Jun 1, 2021

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.

3reactions
pradyunsgcommented, Jun 1, 2021

FWIW, I think we should bump up to TOML 1.0.0 here, and update our standards to that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

English v1.0.0 - TOML
TOML is designed to map unambiguously to a hash table. TOML should be easy to parse into data structures in a wide variety...
Read more >
Should PEP 518 specify TOML spec version for pyproject.toml?
I think it would be a good idea for PEP 518 to state that pyproject.toml must be parsed, for instance, strictly as TOML...
Read more >
toml-reader: TOML format parser compliant with v1.0.0.
TOML format parser compliant with v1.0.0. See README.md for more details. [Skip to Readme]. Modules. [Index] [Quick Jump].
Read more >
toml package - github.com/wangxiangustc/tidb/_vendor/src/github ...
Package toml provides facilities for decoding and encoding TOML configuration files via reflection. There is also support for delaying decoding with the ...
Read more >
Toml: Tom's Obvious, Minimal Language | Hacker News
TOML is especially well suited for projects that need a simple configuration file that maps unambiguously to a hash table. There are still...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found