PyYAML yaml.load(input) Deprecation

Hi.

Just updated my pip installation:

Package        Version    Latest   Type 
-------------- ---------- -------- -----
beautifulsoup4 4.6.3      4.7.1    wheel
certifi        2018.11.29 2019.3.9 wheel
jellyfish      0.6.1      0.7.1    sdist
munkres        1.0.12     1.1.2    wheel
pip            19.0.2     19.0.3   wheel
pylast         2.4.0      3.1.0    wheel
PyYAML         3.13       5.1      sdist
wheel          0.33.0     0.33.1   wheel

and now am getting this error:

$ beet version

/usr/local/lib/python3.7/site-packages/beetsplug/lastgenre/__init__.py:155: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.

genres_tree = yaml.load(f)

beets version 1.4.8

Python version 3.7.2

What gives?

Looks like we need to change yaml.load(f) in that file to yaml.safe_load(f) in that file! Any chance you could step up with a pull request?

Done. My first PR ever.

1 Like