uyar / calico

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

replace YAML.round_trip_load_all() with YAML.load() #17

Open toprakmurat opened 7 months ago

toprakmurat commented 7 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)