diff --git a/tidalapi/artist.py b/tidalapi/artist.py index da2d881..b2808c4 100644 --- a/tidalapi/artist.py +++ b/tidalapi/artist.py @@ -22,6 +22,7 @@ from datetime import datetime from enum import Enum from typing import TYPE_CHECKING, List, Mapping, Optional, Union, cast +from warnings import warn import dateutil.parser from typing_extensions import NoReturn @@ -126,9 +127,13 @@ def get_albums(self, limit: Optional[int] = None, offset: int = 0) -> List["Albu return self._get_albums(params) def get_albums_ep_singles( - self, limit: Optional[int] = None, offset: int = 0 + self, limit: Optional[int] = None, offset: int = 0 ) -> List["Album"]: - print("This method is deprecated an will be removed in a future release. Use instead `get_ep_singles`") + warn( + "This method is deprecated an will be removed in a future release. Use instead `get_ep_singles`", + DeprecationWarning, + stacklevel=2, + ) return self.get_ep_singles(limit=limit, offset=offset) @@ -143,15 +148,17 @@ def get_ep_singles( return self._get_albums(params) def get_albums_other( - self, limit: Optional[int] = None, offset: int = 0 + self, limit: Optional[int] = None, offset: int = 0 ) -> List["Album"]: - print("This method is deprecated an will be removed in a future release. Use instead `get_other`") + warn( + "This method is deprecated an will be removed in a future release. Use instead `get_other`", + DeprecationWarning, + stacklevel=2, + ) return self.get_other(limit=limit, offset=offset) - def get_other( - self, limit: Optional[int] = None, offset: int = 0 - ) -> List["Album"]: + def get_other(self, limit: Optional[int] = None, offset: int = 0) -> List["Album"]: """Queries TIDAL for albums the artist has appeared on as a featured artist. :return: A list of :class:`Albums `