Merge branch 'main' into feature

This commit is contained in:
Jeremy Stretch
2025-04-22 16:36:17 -04:00
79 changed files with 12134 additions and 12015 deletions

View File

@@ -566,28 +566,23 @@ class BaseScript:
def load_yaml(self, filename):
"""
Return data from a YAML file
TODO: DEPRECATED: Remove this method in v4.4
"""
# TODO: DEPRECATED: Remove this method in v4.4
self._log(
_("load_yaml is deprecated and will be removed in v4.4"),
level=LogLevelChoices.LOG_WARNING
)
try:
from yaml import CLoader as Loader
except ImportError:
from yaml import Loader
file_path = os.path.join(settings.SCRIPTS_ROOT, filename)
with open(file_path, 'r') as datafile:
data = yaml.load(datafile, Loader=Loader)
data = yaml.load(datafile, Loader=yaml.SafeLoader)
return data
def load_json(self, filename):
"""
Return data from a JSON file
TODO: DEPRECATED: Remove this method in v4.4
"""
# TODO: DEPRECATED: Remove this method in v4.4
self._log(
_("load_json is deprecated and will be removed in v4.4"),
level=LogLevelChoices.LOG_WARNING