From ae791f262262c077a884cb12e44dfa7ea5323490 Mon Sep 17 00:00:00 2001 From: Eyal-Danieli Date: Tue, 31 Dec 2024 13:50:08 +0200 Subject: [PATCH] fix PyYAML loading --- cli/item_yaml.py | 2 +- cli/test_suite.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/item_yaml.py b/cli/item_yaml.py index fbd7eb7e8..bef287bb3 100644 --- a/cli/item_yaml.py +++ b/cli/item_yaml.py @@ -40,7 +40,7 @@ def update_functions_yaml(root_directory: str, if (inner_dir / item_yaml).exists(): path = str(inner_dir)+"/"+item_yaml stream = open(path, 'r') - data = yaml.load(stream) + data = yaml.load(stream, Loader=yaml.FullLoader) if version: data['version'] = version if mlrun_version: diff --git a/cli/test_suite.py b/cli/test_suite.py index b386849e8..f5fa99017 100644 --- a/cli/test_suite.py +++ b/cli/test_suite.py @@ -599,7 +599,7 @@ def clean_pipenv(directory: str): # load item yaml def load_item(path): with open(path, 'r') as stream: - data = yaml.load(stream) + data = yaml.load(stream, yaml.FullLoader) return data