jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/487630 )
Change subject: pagegenerators.py: fix tests in PY2 for -querypage ......................................................................
pagegenerators.py: fix tests in PY2 for -querypage
Bug: T214234 Change-Id: I0f09ff13c760e506081521e9dfacb20a5adeb9f3 --- M pywikibot/pagegenerators.py 1 file changed, 4 insertions(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index d735c1f..f342683 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -59,6 +59,9 @@
if sys.version_info[0] > 2: basestring = (str, ) + from itertools import zip_longest +else: + from itertools import izip_longest as zip_longest
_logger = 'pagegenerators'
@@ -754,8 +757,7 @@
max_w = max(len(p) for p in pages[::2]) + 4 txt = 'Available special pages:\n' - for a, b in itertools.zip_longest(pages[::2], pages[1::2], - fillvalue=''): + for a, b in zip_longest(pages[::2], pages[1::2], fillvalue=''): txt += ' {a:<{max_w}}{b}\n'.format(a=a, b=b, max_w=max_w) txt += ('\nMaximum number of pages to return is {max} ' '({highmax} for bots).\n'.format(**limit))
pywikibot-commits@lists.wikimedia.org