diff --git a/plexapi/library.py b/plexapi/library.py index 51006b06..e72e4d86 100644 --- a/plexapi/library.py +++ b/plexapi/library.py @@ -838,7 +838,7 @@ class LibrarySection(PlexObject): """ return self._server.history(maxresults=maxresults, mindate=mindate, librarySectionID=self.key, accountID=1) - @deprecated('use "collections" (plural) instead', stacklevel=2) + @deprecated('use "collections" (plural) instead') def collection(self, **kwargs): return self.collections() @@ -1594,7 +1594,7 @@ class Collections(PlexPartialObject, ArtMixin, PosterMixin, LabelMixin): self.updatedAt = utils.toDatetime(data.attrib.get('updatedAt')) @property - @deprecated('use "items" instead') + @deprecated('use "items" instead', stacklevel=3) def children(self): return self.items() diff --git a/plexapi/utils.py b/plexapi/utils.py index 03ff8efb..e4225941 100644 --- a/plexapi/utils.py +++ b/plexapi/utils.py @@ -466,7 +466,7 @@ def base64str(text): return base64.b64encode(text.encode('utf-8')).decode('utf-8') -def deprecated(message, stacklevel=3): +def deprecated(message, stacklevel=2): def decorator(func): """This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emitted