jenkins-bot merged this change.

View Change

Approvals: Zhuyifei1999: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
page.Category.articles: Fix the equivalant of startFrom in core

The way `startFrom` works in compat is equal to `startprefix` in core.[1]
`startsort`, which is deprecated in MW 1.24, needs to be a binary string,[2]
otherwise the user will get the wrong results because of the wrong start.

This means that compat's `startFrom` has no equivalant in core if the
MediaWiki version is less than 1.18.

[1]:
https://phabricator.wikimedia.org/diffusion/PWBO/browse/master/catlib.py;dfd2f011fa9614e2131743e761f1dbafe7f2f1a0$327
[2]: https://www.mediawiki.org/wiki/API:Categorymembers

Change-Id: I10620e82d2d0792579889199ffa5e94a0cce0d07
---
M pywikibot/page.py
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pywikibot/page.py b/pywikibot/page.py
index 97c6681..93d5f40 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -2798,7 +2798,7 @@
if total == 0:
return

- @deprecated_args(startFrom='startsort', step=None)
+ @deprecated_args(startFrom='startprefix', step=None)
def articles(self, recurse=False, total=None,
content=False, namespaces=None, sortby=None,
reverse=False, starttime=None, endtime=None,

To view, visit change 428263. To unsubscribe, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I10620e82d2d0792579889199ffa5e94a0cce0d07
Gerrit-Change-Number: 428263
Gerrit-PatchSet: 1
Gerrit-Owner: Dalba <dalba.wiki@gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: Zhuyifei1999 <zhuyifei1999@gmail.com>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444@gmail.com>
Gerrit-Reviewer: jenkins-bot <>