diff --git a/src/pylast/__init__.py b/src/pylast/__init__.py index 21e2140..fb2de22 100644 --- a/src/pylast/__init__.py +++ b/src/pylast/__init__.py @@ -1726,6 +1726,15 @@ class Artist(_BaseObject, _Taggable): SIZE_SMALL """ + warnings.warn( + "Artist.get_cover_image is deprecated and will be removed in a future " + "version. In the meantime, only default star images are available. " + "See https://github.com/pylast/pylast/issues/317 and " + "https://support.last.fm/t/api-announcement/202", + DeprecationWarning, + stacklevel=2, + ) + if "image" not in self.info: self.info["image"] = _extract_all( self._request(self.ws_prefix + ".getInfo", cacheable=True), "image" diff --git a/tests/test_artist.py b/tests/test_artist.py index aa3e007..435db95 100755 --- a/tests/test_artist.py +++ b/tests/test_artist.py @@ -250,7 +250,10 @@ class TestPyLastArtist(TestPyLastWithLastFm): # Act url = artist1.get_url() mbid = artist1.get_mbid() - image = artist1.get_cover_image() + + with pytest.warns(DeprecationWarning): + image = artist1.get_cover_image() + playcount = artist1.get_playcount() streamable = artist1.is_streamable() name = artist1.get_name(properly_capitalized=False)