Support for YAML 1.2
See original GitHub issueAs discussed over at https://github.com/gammapy/gammapy/pull/2218#discussion_r301211357, @bsipocz asked me to raise this issue here.
the pyyaml
library only supports the YAML 1.1 standard from 2005, while only YAML 1.2 added support for scientific notation floating point values.
Summary of differences here: https://yaml.readthedocs.io/en/latest/pyyaml.html
This is why many packages, e.g. conda itself, switch to ruamel.yaml
:
https://yaml.readthedocs.io/en/latest/index.html
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
YAML Ain't Markup Language (YAML™) revision 1.2.2
This specification is both an introduction to the YAML language and the concepts supporting it. It is also a complete specification of the ......
Read more >YAML 1.2 support · Issue #116 · yaml/pyyaml - GitHub
Regarding the parser, both pyyaml and ruamel diverge from the spec and do not fully support YAML 1.1 or 1.2. But the support...
Read more >Differences with PyYAML - ruamel.yaml - Read the Docs
YAML 1.2 dropped support for several features unquoted Yes , No , On , Off · YAML 1.2 no longer accepts strings that...
Read more >YAML 1.2 - IBM
YAML 1.2 is an open standard data serialization language that provides human readable documentation. YAML 1.2 is often used for configuration files.
Read more >yaml 1.2.0 - PECL :: Package
yaml 1.2.0 ; Support for YAML 1.1 (YAML Ain't Markup Language) serialization using the LibYAML library. · http://bd808.com/pecl-file_formats-yaml/ · New Features:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
One thing about
ruamel_yaml
that should be considered is that it appears to be in the midst of a major API change with version 0.15+: https://yaml.readthedocs.io/en/latest/api.html. The docs say that the API is still being fleshed out and production could should stick with <0.15.That API change might be a good thing in the end, but it seems that right now it might just introduce a lot of churn and trouble for astropy to first transition to the <0.15 API and then we have the mess of possibly supporting <0.15 and 0.15+
ruamel_yaml
.tl;dr - I would propose to wait for
ruamel_yaml
1.0 and a stable API before seriously considering a transition for astropy.There is an ASDF PR but it is not merged yet; xref spacetelescope/asdf#677