YAML in std lib?

Paul Moore p.f.moore at gmail.com
Mon Jul 31 09:50:24 EDT 2017


On Sunday, 30 July 2017 07:21:00 UTC+1, Steve D'Aprano  wrote:
> 1.  Perhaps nobody has thought of it.
> 
> 2.  The author of the library refused to allow it, or demanded
>     conditions which the Python developers either cannot or will
>     not meet.
> 
> 3.  The library is under rapid development with a release cycle 
>     faster than Python's standard library.
> 
> 4.  There may be technical reasons (e.g. code quality, external 
>     dependencies) why it isn't added.
> 
> 5.  There may be no consensus among the core developers that this
>     library is important enough to include.
> 
> 6.  Or no agreement about which library to use (if there are
>     more than one).
> 
> 7.  The library is for too small a niche to bother.
> 
> 8.  There may be problems with the legal status of the library, 
>     including legality of the software, copyright, patents, etc.
> 
> 9.  Or it may be only available under a proprietary, closed-source
>     licence that is incompatible with Python's open source licence.
> 
> 10. There may be nobody willing to maintain the library once it
>     is accepted.
> 
> 
> I'm not sure which ones apply to YAML. If I were to guess, my guess would be
> either 5 or 6.

I'd add 4 and 10 as possible issues.

Getting a 3rd party library included into the stdlib also needs to pass the test of "why isn't it sufficient to depend on a library on PyPI?"

As I understand it, YAML as a markup language is not as popular as it once was. There have been concerns expressed about its complexity, and the spec seems to have stagnated (the last update noted yaml.org was in 2011, and many libraries still seem to stick to YAML 1.1, when 1.2 has been out for years). In general, I get the impression that YAML is a great idea if you stick to "the bits that I like" - but unfortunately, different people like different bits :-)

So the first issue is that there's not enough momentum behind YAML as a markup standard to warrant it being in the stdlib.

In addition, the main YAML library on PyPI is PyYAML, and my understanding is that it had some reliability issues (crashes on certain malformed input?) that took a long time to get fixed. So there's code quality and maintenance commitment issues to be addressed (it's entirely possible that those issues are now resolved, but that needs to be confirmed). Furthermore, it uses a C library (libyaml) as an accelerator, which makes the process of bringing it into the stdlib even more complex.

Long story short - there's not enough benefit over "pip install pyyaml" to justify it, even if someone (either the library author, or someone with the author's support) had spent the time putting together a concrete proposal.

Paul



More information about the Python-list mailing list