jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/609524 )

Change subject: [cleanup] Remove deprecated Page/Category/User methods
......................................................................

[cleanup] Remove deprecated Page/Category/User methods

Remove oudated Page/Category/User methods after 10 years.
The FutureWarning was made before 3.0.20200405

Change-Id: Ic8bf29636b47a0aed744301b236412d8c3f36ad2
---
M pywikibot/page/__init__.py
1 file changed, 0 insertions(+), 100 deletions(-)

Approvals:
  JJMC89: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/page/__init__.py b/pywikibot/page/__init__.py
index c923b85..c61f26b 100644
--- a/pywikibot/page/__init__.py
+++ b/pywikibot/page/__init__.py
@@ -2327,50 +2327,6 @@
 
 # ####### DEPRECATED METHODS ########

-    @deprecated('Site.encoding()', since='20090307', future_warning=True)
-    def encoding(self):
-        """DEPRECATED: use self.site.encoding instead."""
-        return self.site.encoding()
-
-    @deprecated('Page.title(with_ns=False)', since='20090307',
-                future_warning=True)
-    def titleWithoutNamespace(self, underscore=False):
-        """DEPRECATED: use self.title(with_ns=False) instead."""
-        return self.title(underscore=underscore, with_ns=False,
-                          with_section=False)
-
-    @deprecated('Page.title(as_filename=True)', since='20090307',
-                future_warning=True)
-    def titleForFilename(self):
-        """DEPRECATED: use self.title(as_filename=True) instead."""
-        return self.title(as_filename=True)
-
-    @deprecated('Page.title(with_section=False)', since='20090307',
-                future_warning=True)
-    def sectionFreeTitle(self, underscore=False):
-        """DEPRECATED: use self.title(with_section=False) instead."""
-        return self.title(underscore=underscore, with_section=False)
-
-    @deprecated('Page.title(as_link=True)', since='20090307',
-                future_warning=True)
-    @deprecated_args(
-        forceInterwiki='force_interwiki', noInterwiki='no_interwiki')
-    def aslink(
-        self, force_interwiki=False, textlink=False, no_interwiki=False
-    ):
-        """DEPRECATED: use self.title(as_link=True) instead."""
-        return self.title(as_link=True, force_interwiki=force_interwiki,
-                          allow_interwiki=not no_interwiki, textlink=textlink)
-
-    @deprecated('Page.title(as_url=True)', since='20090307',
-                future_warning=True)
-    def urlname(self):
-        """Return the Page title encoded for use in an URL.
-
-        DEPRECATED: use self.title(as_url=True) instead.
-        """
-        return self.title(as_url=True)
-
     @deprecated('Page.protection()', since='20150725')
     def getRestrictions(self):
         """DEPRECATED. Use self.protection() instead."""
@@ -3185,31 +3141,6 @@
             for cached_page in check_cache(pywikibot.Timestamp.min):
                 yield cached_page

-# ### DEPRECATED METHODS ####
-    @deprecated('list(Category.subcategories(...))', since='20090307',
-                future_warning=True)
-    def subcategoriesList(self, recurse=False):
-        """DEPRECATED: Equivalent to list(self.subcategories(...))."""
-        return sorted(set(self.subcategories(recurse)))
-
-    @deprecated('list(Category.articles(...))', since='20090307',
-                future_warning=True)
-    def articlesList(self, recurse=False):
-        """DEPRECATED: equivalent to list(self.articles(...))."""
-        return sorted(set(self.articles(recurse)))
-
-    @deprecated('Category.categories()', since='20090307',
-                future_warning=True)
-    def supercategories(self):
-        """DEPRECATED: equivalent to self.categories()."""
-        return self.categories()
-
-    @deprecated('list(Category.categories(...))', since='20090307',
-                future_warning=True)
-    def supercategoriesList(self):
-        """DEPRECATED: equivalent to list(self.categories(...))."""
-        return sorted(set(self.categories()))
-

 class User(Page):

@@ -3316,22 +3247,6 @@
                     self._userprops['blockreason'] = r[0]['reason']
         return self._userprops

-    @deprecated('User.registration()', since='20100609', future_warning=True)
-    def registrationTime(self, force=False):
-        """
-        DEPRECATED. Fetch registration date for this user.
-
-        @param force: if True, forces reloading the data from API
-        @type force: bool
-
-        @return: int (MediaWiki's internal timestamp format) or 0
-        @rtype: int
-        """
-        if self.registration():
-            return int(self.registration().strftime('%Y%m%d%H%M%S'))
-        else:
-            return 0
-
     def registration(self, force=False):
         """
         Fetch registration date for this user.
@@ -3576,21 +3491,6 @@
         """
         return next(iter(self.logevents(total=1)), None)

-    @deprecated('contributions', since='20091130', future_warning=True)
-    @deprecate_arg('limit', 'total')  # To be consistent with rest of framework
-    def editedPages(self, total=500):
-        """
-        DEPRECATED. Use contributions().
-
-        Yields pywikibot.Page objects that this user has
-        edited, with an upper bound of 'total'. Pages returned are not
-        guaranteed to be unique.
-
-        @param total: limit result to this number of pages.
-        @type total: int.
-        """
-        return (item[0] for item in self.contributions(total=total))
-
     @deprecated_args(limit='total', namespace='namespaces')
     def contributions(self, total=500, **kwargs):
         """

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/609524
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ic8bf29636b47a0aed744301b236412d8c3f36ad2
Gerrit-Change-Number: 609524
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: JJMC89 <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to