[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#823200: ITP: python-poyo -- lightweight (subset of) YAML parser for Python



On Mon, 02 May 2016 at 09:05:33 +0200, Vincent Bernat wrote:
> Poyo is a simple parser for a subset of YAML. The subset is quite
> restricted and doesn't include JSON or any JSON constructs.

Ugh. Restricted "not quite" dialects of well-known languages considered
harmful...

> I need
> this dependency as part of cookiecutter but I could also just patch
> cookie cutter to use ruamel.yaml or PyYAML which are already packaged.

There appear to be versions of python-cookiecutter that depend on both
already, suggesting that its upstream author can't make up their mind?
(python-yaml in stable, python-ruamel.yaml in testing)

python-yaml (PyYAML) appears to be fairly ubiquitous: 150+ packages
have a hard dependency on it, including some quite major ones
like various pieces of OpenStack. python-ruamel.yaml's only reverse
dependency seems to be python-cookiecutter.

I would recommend going with majority opinion on this one. I
use python3-yaml as a "humane"[1] data definition language in
game-data-packager, and it seems fine. It isn't the fastest, but if you
need fast human-readable (de)serialization that doesn't need to be humane
for *writing*, use Python's built-in support for JSON instead.

(game-data-packager actually "compiles" from the uncompressed YAML that
is stored in git to the zipped JSON that is in the binary package,
during its build - it's very much data-driven, so this speeds up its
startup by at least an order of magnitude.)

    S

[1] http://bluebones.net/2005/02/humane-text-formats/


Reply to: