Skip to content

gh-113234: Add remaining TOML types to conversation table #113236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

ryan-duve
Copy link
Contributor

@ryan-duve ryan-duve commented Dec 17, 2023

Resolves #113234

This adds two entries to the documentation for the conversion table for TOML.


📚 Documentation preview 📚: https://cpython-previews--113236.org.readthedocs.build/

@ghost
Copy link

ghost commented Dec 17, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@encukou
Copy link
Member

encukou commented Dec 18, 2023

There's value in matching the TOML spec, and technically-redundant entries won't hurt. (For sufficiently advanced users, all of the table falls under “common sense” anyway...)

Given that the spec lists these types last, and they're technically redundant (so, less important to document), could you move them to the end of the table?

Maybe it would be best to then try to match the spec even more. (The spec has a well-thought ordering, IMO!):

  • Move “table” between “Array” and the new “Inline table”, to match its position in the TOML spec
  • Add a new entry “TOML document → dict” to the beginning.

@hukkin & @hauntsaninja, any opinions?

Per @encukou's suggestion, add the "TOML document" type and then reorder all rows to match the TOML spec.  See PR comment for details: python#113236 (comment)
@ryan-duve
Copy link
Contributor Author

Given that the spec lists these types last, and they're technically redundant (so, less important to document), could you move them to the end of the table?

@encukou I reordered these rows and added "TOML document" in aa96a62

Copy link
Contributor

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable enough to me! :-)

@encukou encukou merged commit 76d757b into python:main Dec 19, 2023
@miss-islington-app
Copy link

Thanks @ryan-duve for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@bedevere-app
Copy link

bedevere-app bot commented Dec 19, 2023

GH-113283 is a backport of this pull request to the 3.12 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 19, 2023
@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Dec 19, 2023
@bedevere-app
Copy link

bedevere-app bot commented Dec 19, 2023

GH-113284 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 19, 2023
@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Dec 19, 2023
@hugovk
Copy link
Member

hugovk commented Dec 19, 2023

@ryan-duve Congratulations and thank you for your first CPython PR! 🎉

encukou pushed a commit that referenced this pull request Dec 19, 2023
…ing types (GH-113236) (GH-113283)

gh-113234: tomllib docs: reorder conversion table & add remaining types (GH-113236)
(cherry picked from commit 76d757b)

Co-authored-by: ryan-duve <[email protected]>
encukou pushed a commit that referenced this pull request Dec 19, 2023
…ing types (GH-113236) (GH-113284)

gh-113234: tomllib docs: reorder conversion table & add remaining types (GH-113236)
(cherry picked from commit 76d757b)

Co-authored-by: ryan-duve <[email protected]>
@ryan-duve ryan-duve deleted the fix-issue-113234 branch December 19, 2023 10:50
ryan-duve added a commit to ryan-duve/cpython that referenced this pull request Dec 26, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add remaining TOML types to tomllib conversation table documentation
4 participants