https://bugzilla.wikimedia.org/show_bug.cgi?id=64997
Bug ID: 64997 Summary: Site.preloadpages yields only one item per data request 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: info@gno.de Web browser: --- Mobile Platform: ---
(Maybe a new with mw 1.24) Site,preloadpageds only yields 1 item. Sample as follows:
import pwb import pywikibot as py s = py.Site('bar') pagenames =['Haiku', 'Homer', 'Ilias', 'Watzmo', 'Wean'] pagelist = [py.Page(s, name) for name in pagenames] gen = s.preloadpages(pagelist) for p in gen:
print p.title() Retrieving 5 pages from wikipedia:bar. Haiku
the request was /w/api.php?maxlag=5&format=json&rvprop=ids|flags|timestamp|user|comment|content&prop=revisions|info|categoryinfo&titles=Homer|Ilias|Watzmo|Wean|Haiku&meta=userinfo&indexpageids=&action=query&uiprop=blockinfo|hasmsg
inserting direct request call into preloadpages with
data = rvgen.request.submit() print '#### ####', len(data)
gives me
#### #### 1
https://bugzilla.wikimedia.org/show_bug.cgi?id=64997
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |Highest Severity|normal |major
https://bugzilla.wikimedia.org/show_bug.cgi?id=64997
--- Comment #1 from xqt info@gno.de --- direct web call without bot:
http://bar.wikipedia.org/w/api.php?maxlag=5&format=jsonfm&rvprop=ids...
gives the complete result
https://bugzilla.wikimedia.org/show_bug.cgi?id=64997
Russell Blau russblau@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |russblau@hotmail.com
--- Comment #2 from Russell Blau russblau@hotmail.com --- I can't reproduce this; I ran exactly the same script and it printed five titles.
https://bugzilla.wikimedia.org/show_bug.cgi?id=64997
--- Comment #3 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 131991 had a related patch set uploaded by Xqt: (bug 64997) Bugfix - Note: self.limit could be -1
https://gerrit.wikimedia.org/r/131991
https://bugzilla.wikimedia.org/show_bug.cgi?id=64997
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=64997
--- Comment #4 from xqt info@gno.de --- I found that bug tracing self.limit which could be -1. Bug was introduced with https://gerrit.wikimedia.org/r/#/c/130019/
https://bugzilla.wikimedia.org/show_bug.cgi?id=64997
--- Comment #5 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 131991 merged by jenkins-bot: (bug 64997) Bugfix - Note: self.limit could be -1
https://gerrit.wikimedia.org/r/131991
https://bugzilla.wikimedia.org/show_bug.cgi?id=64997
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
https://bugzilla.wikimedia.org/show_bug.cgi?id=64997
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |64489
pywikipedia-bugs@lists.wikimedia.org