Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

replacing use of deprecated ruamel.yaml.safe_load #380

Merged
merged 2 commits into from
Nov 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions boa/core/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import subprocess
import sys
from conda.core.package_cache_data import PackageCacheData
import ruamel
from ruamel.yaml import YAML
import tempfile
from pathlib import Path
from os.path import isdir, join
Expand Down Expand Up @@ -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")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typ or type?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh...

Copy link

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.

d = loader.load(fi)
o = Output(d, config)
return MetaData(os.path.dirname(yml), o)

Expand Down
Loading