jenkins-bot has submitted this change and it was merged.
Change subject: Replace compat.query.GetData() ......................................................................
Replace compat.query.GetData()
It has been marked as deprecated since its addition by Merlijn van Deen back in 2012 (commit 6dfa2cfff5e2f85cee51018250b92424b1ce751b). The only bundled script using it, blockreview.py, has been updated to use APISite.allusers() instead.
split from Gerrit change I7547897fd8719836c9eaa2a2b313c552e645a519
Change-Id: Idbb143835a2df1b8de994bb84631999a898d9dd4 --- M scripts/blockreview.py 1 file changed, 2 insertions(+), 12 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/blockreview.py b/scripts/blockreview.py index 5243d2c..d776a4c 100644 --- a/scripts/blockreview.py +++ b/scripts/blockreview.py @@ -23,7 +23,6 @@ #
import pywikibot -from pywikibot.compat import query from pywikibot import i18n
@@ -245,20 +244,11 @@ }
def SysopGenerator(self): - params = { - 'action': 'query', - 'list': 'allusers', - 'augroup': 'sysop', - 'auprop': 'groups', - 'aulimit': 500, - } - data = query.GetData(params, self.site) - for user in data['query']['allusers']: + for user in self.site.allusers(group='sysop'): # exclude sysop bots if 'bot' not in user['groups']: # yield the sysop talkpage - yield pywikibot.Page(self.site, user['name'], - ns=3) + yield pywikibot.Page(self.site, user['name'], ns=3)
def load(self, page): """Load the given page and return the page text."""