jenkins-bot submitted this change.
[bugfix] Use 50 as default ParamInfo._limit for the first call
ParamInfo._limit is not set for the first ParamInfo._fetch() call with
frozenset({'paraminfo', 'query', 'main'}) module. Use a default of 50.
Bug: T340617
Change-Id: I640e21560aa3c655a4c5c6c4ada790d7703ab798
---
M pywikibot/data/api/_paraminfo.py
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/pywikibot/data/api/_paraminfo.py b/pywikibot/data/api/_paraminfo.py
index d0a71f1..d2a9cc8 100644
--- a/pywikibot/data/api/_paraminfo.py
+++ b/pywikibot/data/api/_paraminfo.py
@@ -195,7 +195,9 @@
"""
def module_generator():
"""A generator yielding batches of modules."""
- for batch in batched(sorted(modules), self._limit):
+ # T340617: self._limit is not set for the first modules
+ # which is frozenset({'paraminfo', 'query', 'main'})
+ for batch in batched(sorted(modules), self._limit or 50):
for failed_module in failed_modules:
yield [failed_module]
failed_modules.clear()
To view, visit change 933865. To unsubscribe, or for help writing mail filters, visit settings.