From 6654d13ba20e052da334be62c27e38555b79f739 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Wed, 15 Oct 2025 09:23:13 -0700 Subject: [PATCH] Add a test to ensure !include files use the same loader (settings) --- octodns/yaml.py | 2 +- tests/config/include/dict_too.yaml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/octodns/yaml.py b/octodns/yaml.py index 77c1053..e40c1c1 100644 --- a/octodns/yaml.py +++ b/octodns/yaml.py @@ -38,7 +38,7 @@ class ContextLoader(SafeLoader): def load_file(filename): filename = join(directory, filename) with open(filename, 'r') as fh: - return safe_load(fh, self.__class__) + return load(fh, self.__class__) if not isinstance(node.value, list): # single filename, just load and return whatever is in it diff --git a/tests/config/include/dict_too.yaml b/tests/config/include/dict_too.yaml index ea4423a..918bdb0 100644 --- a/tests/config/include/dict_too.yaml +++ b/tests/config/include/dict_too.yaml @@ -1,3 +1,5 @@ --- -foo: bar z: 43 +# keys are intentionally out of order here to ensure !include files are loaded +# with the same laoder class and thus "settings" as their parent +foo: bar