From 8347aa248b1c4aa6e5c86a4b062e83163e9e6af3 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Wed, 27 Mar 2019 16:02:25 +0100 Subject: [PATCH] config: Introduce a dumper without aliases Aliases/anchors are the &things in the YAML dumps. They require storing a id map of every object to be saved and may require a lot of memory while saving large items. --- weboob/tools/config/yamlconfig.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/weboob/tools/config/yamlconfig.py b/weboob/tools/config/yamlconfig.py index 46c79c285d..2f5916426b 100644 --- a/weboob/tools/config/yamlconfig.py +++ b/weboob/tools/config/yamlconfig.py @@ -43,6 +43,11 @@ class WeboobDumper(Dumper): pass +class WeboobNoAliasDumper(WeboobDumper): + def ignore_aliases(self, data): + return True + + WeboobDumper.add_representer(weboob.tools.date.date, WeboobDumper.represent_date) -- GitLab