Merge pull request #3192 from translit/yaml-safe-load

Fix PyYAML yaml.load(input) Deprecation
This commit is contained in:
Adrian Sampson 2019-03-31 21:46:29 -04:00
commit c74a7059b4
2 changed files with 5 additions and 1 deletions

View file

@ -152,7 +152,7 @@ class LastGenrePlugin(plugins.BeetsPlugin):
self._log.debug('Loading canonicalization tree {0}', c14n_filename)
c14n_filename = normpath(c14n_filename)
with codecs.open(c14n_filename, 'r', encoding='utf-8') as f:
genres_tree = yaml.load(f)
genres_tree = yaml.safe_load(f)
flatten_tree(genres_tree, [], self.c14n_branches)
@property

View file

@ -171,6 +171,10 @@ Fixes:
* Fix several uses of deprecated standard-library features on Python 3.7.
Thanks to :user:`arcresu`.
:bug:`3197`
* :doc:`/plugins/lastgenre`: Avoid a deprecation warning from the YAML
library.
Thanks to :user:`translit`.
:bug:`3192`
.. _python-itunes: https://github.com/ocelma/python-itunes