jenkins-bot submitted this change.

View Change

Approvals: JJMC89: Looks good to me, approved jenkins-bot: Verified
[cleanup] Remove deprecated watchpage method

Change-Id: I3c2840a82a756d94603cf4752184b9334ff3df34
---
M pywikibot/site/_apisite.py
1 file changed, 0 insertions(+), 22 deletions(-)

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,

To view, visit change 693514. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I3c2840a82a756d94603cf4752184b9334ff3df34
Gerrit-Change-Number: 693514
Gerrit-PatchSet: 1
Gerrit-Owner: Damian <atagar1@gmail.com>
Gerrit-Reviewer: JJMC89 <JJMC89.Wikimedia@gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged