jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/693514 )
Change subject: [cleanup] Remove deprecated watchpage method ......................................................................
[cleanup] Remove deprecated watchpage method
Change-Id: I3c2840a82a756d94603cf4752184b9334ff3df34 --- M pywikibot/site/_apisite.py 1 file changed, 0 insertions(+), 22 deletions(-)
Approvals: JJMC89: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site/_apisite.py b/pywikibot/site/_apisite.py index 80fc46a..3fda036 100644 --- a/pywikibot/site/_apisite.py +++ b/pywikibot/site/_apisite.py @@ -2419,28 +2419,6 @@ unwatch = 'unwatched' if unwatch else 'watched' return all(unwatch in r for r in results['watch'])
- @need_right('editmywatchlist') - @deprecated('Site().watch', since='20160102', future_warning=True) - def watchpage(self, page, unwatch=False) -> bool: - """ - Add or remove page from watchlist. - - DEPRECATED: Use Site().watch() instead. - - @param page: A single page. - @type page: A page object, a page-title string. - @param unwatch: If True, remove page from watchlist; - if False (default), add it. - @return: True if API returned expected response; False otherwise - - """ - try: - result = self.watch(page, unwatch) - except KeyError: - pywikibot.error('watchpage: Unexpected API response') - result = False - return result - @need_right('purge') def purgepages(self, pages, forcelinkupdate: bool = False, forcerecursivelinkupdate: bool = False,