https://bugzilla.wikimedia.org/show_bug.cgi?id=64489
Bug ID: 64489 Summary: Clean up limit handling (data/api.py) Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: valhallasw@arctus.nl Blocks: 56190 Web browser: --- Mobile Platform: ---
QueryGenerator has a very complicated structure to handle request limit handling; some of it is currently working by accident, e.g.:
new_limit = None (...) new_limit = min(new_limit, self.api_limit // 10, 250)
Now, new_limit is what? None! (at least, on python 2 -- this returns an error in python 3)
Which is actually required as some requests don't allow limits, such as
https://en.wikipedia.org/w/api.php?maxlag=5&pageids=1969218%7C225758%7C3...
adding &rvlimit=50 returns
error: { code: "rvmultpages", info: "titles, pageids or a generator was used to supply multiple pages, but the limit, startid, endid, dirNewer, user, excludeuser, start and end parameters may only be used on a single page." }
https://bugzilla.wikimedia.org/show_bug.cgi?id=64489
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |info@gno.de Depends on| |64997, 65013
https://bugzilla.wikimedia.org/show_bug.cgi?id=64489
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jayvdb@gmail.com Severity|normal |major
pywikipedia-bugs@lists.wikimedia.org