-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
PEP 680: "tomllib" Support for parsing TOML in the Standard Library #2218
Conversation
Co-authored-by: Taneli Hukkinen <3275109+hukkin@users.noreply.github.com>
Co-authored-by: Taneli Hukkinen <3275109+hukkin@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Taneli Hukkinen <3275109+hukkin@users.noreply.github.com>
pep-9999.rst
Outdated
PEP: for core Python packaging use cases or for tools that need to read | ||
configuration. | ||
|
||
Use cases that involve editing TOML (as opposed to writing brand new TOML) are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you refer to cases like poetry add
here? For example, poetry add requests
will write requests = "^x.y"
to your pyproject.toml
file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's a good example.
The next available number is PEP 680. Could you use that, to make the PEP editors' work easier? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to sponsor this. Some of the details aren't what I'd choose, but it's a good draft PEP.
pep-9999.rst
Outdated
<https://github.com/PyCQA/flake8/issues/234#issuecomment-812800657>`_. | ||
|
||
Given the special place TOML already has in the Python ecosystem, it makes sense | ||
for this to be an included battery. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest getting buy-in from the maintainers of tools that support pyproject.toml
, e.g. poetry, pdm, and the tools mentioned above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mypy
should be easy seeing that @hauntsaninja is a maintainer 😄
flit
is not currently listed but I'm fairly sure I won't have to persuade @takluyver ?
isort
has a no-dependencies policy (vendor instead) so I bet @timothycrosley also has no objections?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a maintainer of Black and mypy I'd also be happy to see a TOML parser in the stdlib :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect @pradyunsg could do so for pip and some other packaging tools?
pip switched vendoring toml to tomli: pypa/pip#10035
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be in favour as a pip maintainer.
this PEP, listed in `Appendix A`_. | ||
|
||
Finally, the ``toml`` package on PyPI is not actively maintained and `we have | ||
been unable to contact the author <https://github.com/uiri/toml/issues/361>`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
underscores are missing to make this a link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed this here: #2223
https://grep.app. | ||
|
||
The ``toml.TomlDecoder`` interface exposed is not simple, containing nine methods. | ||
See `here <https://github.com/uiri/toml/blob/3f637dba5f68db63d4b30967fedda51c82459471/toml/decoder.pyi#L36>`__. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using here
or click
for link texts is poor metadata (try for example context menu on link → save bookmark, browser defaults to link text for bookmark title) and accessibility (features like jump to link or display list of all links in document rely on text link too)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed here
(haha 😄 )
No description provided.