jenkins-bot merged this change.

View Change

Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
Use 'rvslots' when fetching categorymember() content on MW 1.32+

This is a temporary workaround to silence the API warnings. We perhaps need to
update the Revision class for other slot types in the future.

Bug: T200955
Change-Id: I842afdbbe659d17522697164d3dd216ae0860819
---
M pywikibot/site.py
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/pywikibot/site.py b/pywikibot/site.py
index c4a97e5..286f213 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -4002,6 +4002,8 @@
elif endsort:
raise ValueError("categorymembers: "
"invalid combination of 'sortby' and 'endsort'")
+ if content and self.mw_version >= '1.32':
+ cmargs['rvslots'] = '*'

return self._generator(api.PageGenerator, namespaces=namespaces,
total=total, g_content=content, **cmargs)

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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I842afdbbe659d17522697164d3dd216ae0860819
Gerrit-Change-Number: 462148
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki@gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: jenkins-bot (75)