Skip to content

Ensure LagoInitFile is loaded by a consistent order #472

@nvgoldin

Description

@nvgoldin

We use PyYAML which does not ensure any consistent order when loading the file. The natural thing is to use OrderedDict instead.
Existing PR: #346, fails on something that looks like a bug when using both the yaml merge operator and a custom loader which ensures OrderedDict is used.

Recently, I was playing with anymarkup, a python library which also loads YAMLs as OrderedDict, one option is to check if it happens there too, and if not see what we are missing to make it work.

Some inspiration:
http://stackoverflow.com/questions/38110900/constructorerror-with-yaml-load-while-using-ordereddict-that-support-auto-vivifi
http://stackoverflow.com/questions/5121931/in-python-how-can-you-load-yaml-mappings-as-ordereddicts

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions