uyar / calico

GNU General Public License v3.0
8 stars 4 forks source link

YAML.round_trip_load_all() is deprecated #16

Open toprakmurat opened 8 months ago

toprakmurat commented 8 months ago

Calico uses YAML.round_trip_load_all() to load the content but it is deprecated

parse.py, line: 79-82

try:
    spec = yaml.round_trip_load(content)
except yaml.YAMLError as e:
    raise AssertionError(str(e))

Official documentation suggest using YAML.load() to load the document

from ruamel.yaml import YAML

yaml=YAML(typ='safe')   # default, if not specified, is 'rt' (round-trip)
yaml.load(doc)