Native support of YAML in Python STDLIB
![](https://secure.gravatar.com/avatar/c54e9cd7f9c2329275a768cc324501e4.jpg?s=120&d=mm&r=g)
Though this has been discussed before, the last detailed discussion appears to have been roughly 9 years ago. YAML is a technical standard widely used in various projects and at least two major ones (Ansible and containers). Though PyYAML has become ubiquitous as the primary Python solution to supporting YAML, I would think it time for Python to formally adopt this technology in the core foundation. Is there still a reason why this isn't being pursued as native infrastructure in Python?
![](https://secure.gravatar.com/avatar/176220408ba450411279916772c36066.jpg?s=120&d=mm&r=g)
I think the answer is that yaml is a pretty complex specification -- powerful and flexible, but a bit of a mess :-( This is why toml, rather than yaml, was selected for package metadata specification (pyproject,toml) -- which then resulted in an stdlib toml package. At this point, I think you'd have a hard time adding something like that to the stdlib if it wasn't used in the core tools themselves. It's acknowledged that you can't get far without *some* external dependencies these days, so it's not critical to have all the batteries in Python, even if it's a pretty common use case. JSON is pretty ubiquitous these days, but I'm not sure even that would be added today given the current state of packaging. This is all just my opinion having monitored a LOT of these discussion over the years. -CHB On Mon, Mar 13, 2023 at 8:57 AM scott.fields--- via Python-ideas < python-ideas@python.org> wrote:
Though this has been discussed before, the last detailed discussion appears to have been roughly 9 years ago.
YAML is a technical standard widely used in various projects and at least two major ones (Ansible and containers).
Though PyYAML has become ubiquitous as the primary Python solution to supporting YAML, I would think it time for Python to formally adopt this technology in the core foundation.
Is there still a reason why this isn't being pursued as native infrastructure in Python? _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/HU755X... Code of Conduct: http://python.org/psf/codeofconduct/
-- Christopher Barker, PhD (Chris) Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython
![](https://secure.gravatar.com/avatar/cdc87637918eccd37ca88e9079e73705.jpg?s=120&d=mm&r=g)
In a similar vein, I'm guessing that if XML were new today, we'd have zero APIs in the standard library to support it... rather than SIX! On Mon, Mar 13, 2023 at 12:23 PM Christopher Barker <pythonchb@gmail.com> wrote:
I think the answer is that yaml is a pretty complex specification -- powerful and flexible, but a bit of a mess :-(
This is why toml, rather than yaml, was selected for package metadata specification (pyproject,toml) -- which then resulted in an stdlib toml package.
At this point, I think you'd have a hard time adding something like that to the stdlib if it wasn't used in the core tools themselves. It's acknowledged that you can't get far without *some* external dependencies these days, so it's not critical to have all the batteries in Python, even if it's a pretty common use case.
JSON is pretty ubiquitous these days, but I'm not sure even that would be added today given the current state of packaging.
This is all just my opinion having monitored a LOT of these discussion over the years.
-CHB
On Mon, Mar 13, 2023 at 8:57 AM scott.fields--- via Python-ideas < python-ideas@python.org> wrote:
Though this has been discussed before, the last detailed discussion appears to have been roughly 9 years ago.
YAML is a technical standard widely used in various projects and at least two major ones (Ansible and containers).
Though PyYAML has become ubiquitous as the primary Python solution to supporting YAML, I would think it time for Python to formally adopt this technology in the core foundation.
Is there still a reason why this isn't being pursued as native infrastructure in Python? _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/HU755X... Code of Conduct: http://python.org/psf/codeofconduct/
-- Christopher Barker, PhD (Chris)
Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/2KSX52... Code of Conduct: http://python.org/psf/codeofconduct/
-- The dead increasingly dominate and strangle both the living and the not-yet born. Vampiric capital and undead corporate persons abuse the lives and control the thoughts of homo faber. Ideas, once born, become abortifacients against new conceptions.
![](https://secure.gravatar.com/avatar/63ca18e130d527d0741f1da54bb129a7.jpg?s=120&d=mm&r=g)
YAML-LD, YAML-LD-star, Rapidyml JSON5, // Supports comments - https://pypi.org/project/json5/ cysimdjson has comparative PERFormance tests: - https://pypi.org/project/cysimdjson/ - https://pypi.org/project/pysimdjson/ Rapidyaml - https://pypi.org/project/rapidyaml/ YAML-LD - spec: https://json-ld.github.io/yaml-ld/spec - https://json-ld.github.io/yaml-ld/spec/#example-convenience-context - https://github.com/RDFLib/rdflib-jsonld/issues/110 JSON-LD-Star, YAML-LD-Star - spec: https://json-ld.github.io/json-ld-star/#basic-concepts - https://github.com/json-ld/yaml-ld/issues/45 - https://github.com/RDFLib/rdflib-jsonld/issues/109 XML - https://pypi.org/project/defusedxml/ - https://www.google.com/search?q=xml+parser+vulnerabilities - https://www.google.com/search?q=yaml+parser+vulnerabilities +CVE - Which YAML library? - How complex is &YAML:? On Mon, Mar 13, 2023, 12:42 PM David Mertz, Ph.D. <david.mertz@gmail.com> wrote:
In a similar vein, I'm guessing that if XML were new today, we'd have zero APIs in the standard library to support it... rather than SIX!
On Mon, Mar 13, 2023 at 12:23 PM Christopher Barker <pythonchb@gmail.com> wrote:
I think the answer is that yaml is a pretty complex specification -- powerful and flexible, but a bit of a mess :-(
This is why toml, rather than yaml, was selected for package metadata specification (pyproject,toml) -- which then resulted in an stdlib toml package.
At this point, I think you'd have a hard time adding something like that to the stdlib if it wasn't used in the core tools themselves. It's acknowledged that you can't get far without *some* external dependencies these days, so it's not critical to have all the batteries in Python, even if it's a pretty common use case.
JSON is pretty ubiquitous these days, but I'm not sure even that would be added today given the current state of packaging.
This is all just my opinion having monitored a LOT of these discussion over the years.
-CHB
On Mon, Mar 13, 2023 at 8:57 AM scott.fields--- via Python-ideas < python-ideas@python.org> wrote:
Though this has been discussed before, the last detailed discussion appears to have been roughly 9 years ago.
YAML is a technical standard widely used in various projects and at least two major ones (Ansible and containers).
Though PyYAML has become ubiquitous as the primary Python solution to supporting YAML, I would think it time for Python to formally adopt this technology in the core foundation.
Is there still a reason why this isn't being pursued as native infrastructure in Python? _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/HU755X... Code of Conduct: http://python.org/psf/codeofconduct/
-- Christopher Barker, PhD (Chris)
Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/2KSX52... Code of Conduct: http://python.org/psf/codeofconduct/
-- The dead increasingly dominate and strangle both the living and the not-yet born. Vampiric capital and undead corporate persons abuse the lives and control the thoughts of homo faber. Ideas, once born, become abortifacients against new conceptions. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/MT5YBJ... Code of Conduct: http://python.org/psf/codeofconduct/
participants (4)
-
Christopher Barker
-
David Mertz, Ph.D.
-
scott.fields@kyndryl.com
-
Wes Turner