VOLTTRON / volttron

VOLTTRON Distributed Control System Platform
https://volttron.readthedocs.io/
Other
452 stars 217 forks source link

Calling yaml.load() with one parameter is no longer possible in pyyaml 6.0 #3100

Closed davidraker closed 10 months ago

davidraker commented 10 months ago

Prior to pyyaml 6.0, the second argument to yaml.load (the loader class) was optional. That behavior was deprecated, however, due to security issues with the default loader (it allows code injection). The recommended method is to call yaml.safe_load() where possible, or to specify a loader where it is not.

This affects several places in the VOLTTRON code and tests which are not yet using yaml.safe_load().

To Reproduce using pyyaml 6.0, call yaml.load(file_object). An missing argument error will be raised.

Expected behavior All code should be moved to yaml.safe_load.