John Vandenberg has uploaded a new change for review.
https://gerrit.wikimedia.org/r/234723
Change subject: Disable maxlag for meta queries and paraminfo
......................................................................
Disable maxlag for meta queries and paraminfo
Change-Id: I737549f0c7a66917853af9690cf977b3d3090fcf
---
M pywikibot/data/api.py
1 file changed, 10 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/23/234723/1
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index c85f851..7db9bf0 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -1667,8 +1667,13 @@
raise ValueError('The mime_params and params may not share the '
'same keys.')
+ maxlag = config.maxlag
+
if self.action == 'query':
meta = self._params.get("meta", [])
+ if meta:
+ maxlag = None
+
if "userinfo" not in meta:
meta.append("userinfo")
self._params["meta"] = meta
@@ -1687,7 +1692,11 @@
'rawcontinue' not in self._params and
MediaWikiVersion(self.site.version()) >=
MediaWikiVersion('1.25wmf5')):
self._params['rawcontinue'] = ['']
- if "maxlag" not in self._params and config.maxlag:
+
+ elif self.action == 'paraminfo':
+ maxlag = None
+
+ if 'maxlag' not in self._params and maxlag:
self._params["maxlag"] = [str(config.maxlag)]
if "format" not in self._params:
self._params["format"] = ["json"]
--
To view, visit https://gerrit.wikimedia.org/r/234723
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I737549f0c7a66917853af9690cf977b3d3090fcf
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits