Skip to content

Conversation

@StanFromIreland
Copy link
Member

@StanFromIreland StanFromIreland commented Dec 20, 2025

@AA-Turner
Copy link
Member

Should we wait for support in tomli? Currently the packages are kept broadly in sync.

@gpshead
Copy link
Member

gpshead commented Dec 22, 2025

We should make sure PyPI's tomli is also updated. granted I assume it will be long before 3.15 is released.

One question for both libraries: now that there are syntax versions... when do we need to keep track of which version the parsed input conformed to? that probably matters more for tomli which presumably needs to be able to be told what version of toml to emit when writing, as things need to emit something compatible with the oldest reader.

@encukou
Copy link
Member

encukou commented Dec 22, 2025

Should we wait for support in tomli? Currently the packages are kept broadly in sync.

Yes. I know it's against PEP 360, but, tomllib is effectively developed as tomli. That way it gets more extensive testing, and a backport.

This is tracked over at hukkin/tomli#273. If you have the time, could you help out there?

(I won't be able to look at this until January.)


when do we need to keep track of which version the parsed input conformed to?

AFAIK that would be mainly for ensuring that a given TOML file can be parsed by pre-3.15 versions of CPython.

tomllib was added for bootstrapping packaging tools. The fact that it does strict validation is a bonus, but not really needed. So, if TOML 1.1 is strictly backwards-compatible for valid inputs, we can just update.

However, if tomli adds a well-tested version knob, I think we should include it in tomllib as well.

[TOML versioning] probably matters more for tomli which presumably needs to be able to be told what version of toml to emit when writing

That's tomli-w; tomli is only for reading. (And given that tomli-w's output is not configurable, AFAIK it can ignore relaxed syntax.)

@AA-Turner AA-Turner closed this Dec 22, 2025
@AA-Turner
Copy link
Member

Closing for now, let's get support in tomli first.

A

@StanFromIreland
Copy link
Member Author

Why not just mark it as a draft?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants