python-guide icon indicating copy to clipboard operation
python-guide copied to clipboard

Update yaml.load() to avoid warning

Open ghost opened this issue 5 years ago • 0 comments

The yaml.load() function call throws the following warning when Loader isn't specified:

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

The updated default loader avoids arbitrary code execution after issuing a warning, however the warning can be avoided with yaml.load(input, Loader=) or yaml.<full|safe|unsafe>_load(input).

ghost avatar Feb 20 '20 18:02 ghost