You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm noticing some surprising behaviour where ruyaml seems to drop aliases that it thinks are not referenced.
I think this causes issues when dealing with duplicate merge keys as described in #43 for example.
Using this sample function to spot differences between input and output:
yaml = ruyaml.YAML(typ='rt')
yaml.allow_duplicate_keys = True
def read(srcdata):
with io.StringIO() as buf:
yaml.dump(yaml.load(srcdata), buf)
dstdata = buf.getvalue()
sys.stdout.writelines(difflib.unified_diff(srcdata.splitlines(True), dstdata.splitlines(True)))
When using the "correct" merge syntax as mentioned in #43:
I'm noticing some surprising behaviour where ruyaml seems to drop aliases that it thinks are not referenced.
I think this causes issues when dealing with duplicate merge keys as described in #43 for example.
Using this sample function to spot differences between input and output:
When using the "correct" merge syntax as mentioned in #43:
I get these results:
And when using the "incorrect" syntax, things become more surprising:
I get these results:
Any ideas what could be the cause or suggestions on how to deal with this?
The text was updated successfully, but these errors were encountered: