-
Notifications
You must be signed in to change notification settings - Fork 56
replacing use of deprecated ruamel.yaml.safe_load #380
replacing use of deprecated ruamel.yaml.safe_load #380
Conversation
boa/core/test.py
Outdated
@@ -64,7 +64,8 @@ def get_metadata(yml, config, is_pyproject_recipe=False): | |||
|
|||
d = toml.load(fi)["tool"]["boa"] | |||
else: | |||
d = ruamel.yaml.safe_load(fi) | |||
loader = YAML(typ="safe") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typ or type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dependency on ruamel.yaml
Line 17 in 6aa7b7c
"ruamel.yaml", |
should likely be updated to specify a minimum version to ensure the YAML(typ="safe")
support is present, e.g.
ruamel.yaml >=0.15.0
if I'm reading the docs correctly about the first version to support it. (Changelog is unclear.)
boa/core/test.py
Outdated
@@ -64,7 +64,8 @@ def get_metadata(yml, config, is_pyproject_recipe=False): | |||
|
|||
d = toml.load(fi)["tool"]["boa"] | |||
else: | |||
d = ruamel.yaml.safe_load(fi) | |||
loader = YAML(typ="safe") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The equivalent of safe_load(…)
is documented to be YAML(typ="safe", pure=True).load(…)
. The pure=True
argument is noted in the deprecation warning and should likely be used here.
How about just using |
Hello, any update on this? |
With the latest release of
ruamel.yaml
version0.18.2
, nowsafe_load
is removed. In this PR updating a remaining usage of it.