mozilla / active-data-recipes

A repository of various activedata queries and recipes
Mozilla Public License 2.0
9 stars 24 forks source link

Calling yaml.load() without Loader=... is deprecated in PyYAML 5.1 #122

Closed bclary closed 5 years ago

bclary commented 5 years ago

Installing adr from github on Fedora 29 I see the following

$ adr --list
/home/bclary/mozilla/projects/github.com/mozilla/active-data-recipes/adr/util/config.py:17: YAMLLoadWarning: 
  *** Calling yaml.load() without Loader=... is deprecated.
  *** The default Loader is unsafe.
  *** Please read https://msg.pyyaml.org/load for full details.
  cfg = yaml.load(content)

This was installed via:

sudo dnf install libyaml-devel.x86_64
sudo dnf install python3-virtualenv
python3.7 -m virtualenv venv
. venv/bin/activate
python3.7 setup.py develop

I believe PyYAML==5.1b1 is the issue. From the link in the message

Use of PyYAML's yaml.load function without specifying the Loader=... parameter, has been deprecated. In PyYAML version 5.1, you will get a warning, but the function will still work. See How to Disable the Warning below.

ahal commented 5 years ago

Thanks for filing, fixed by: https://github.com/mozilla/active-data-recipes/commit/c03663cff1484cdc4d7f42c2b6184cf64a301897