From 7ecc7d82e7dad1f6f0957212bee53c067e202751 Mon Sep 17 00:00:00 2001 From: Sam Bray Date: Mon, 19 Feb 2024 10:10:27 -0800 Subject: [PATCH] replace deprecated yaml.safe_load function --- src/spyglass/position/v1/dlc_reader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/spyglass/position/v1/dlc_reader.py b/src/spyglass/position/v1/dlc_reader.py index aed66ac4a..8d6c18c23 100644 --- a/src/spyglass/position/v1/dlc_reader.py +++ b/src/spyglass/position/v1/dlc_reader.py @@ -114,7 +114,8 @@ def pkl(self): def yml(self): if self._yml is None: with open(self.yml_path, "rb") as f: - self._yml = yaml.safe_load(f) + safe_yaml = yaml.YAML(typ="safe", pure=True) + self._yml = safe_yaml.load(f) return self._yml @property