diff --git a/beetsplug/lastgenre/__init__.py b/beetsplug/lastgenre/__init__.py index 2f660206e..c3a4332bd 100644 --- a/beetsplug/lastgenre/__init__.py +++ b/beetsplug/lastgenre/__init__.py @@ -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 diff --git a/docs/changelog.rst b/docs/changelog.rst index 8b2375c6a..ea642e758 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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