Yaml 报警告:

YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.

处理办法:

import yaml

#old
with open('yaml.yml') as yp:
    yaml.load(yp)

#new
with open('yaml.yml') as yp:
    yaml.load(yp, Loader=yaml.FullLoader)
Last modification:February 22nd, 2022 at 11:15 am