Last modified: 2014-05-08 11:53:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T66997, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 64997 - Site.preloadpages yields only one item per data request
Site.preloadpages yields only one item per data request
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: Highest major
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks: 64489
  Show dependency treegraph
 
Reported: 2014-05-07 11:28 UTC by xqt
Modified: 2014-05-08 11:53 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description xqt 2014-05-07 11:28:18 UTC
(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
Comment 2 Russell Blau 2014-05-07 15:21:31 UTC
I can't reproduce this; I ran exactly the same script and it printed five titles.
Comment 3 Gerrit Notification Bot 2014-05-07 16:21:36 UTC
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
Comment 4 xqt 2014-05-07 16:23:28 UTC
I found that bug tracing self.limit which could be -1. Bug was introduced with https://gerrit.wikimedia.org/r/#/c/130019/
Comment 5 Gerrit Notification Bot 2014-05-07 18:38:02 UTC
Change 131991 merged by jenkins-bot:
(bug 64997) Bugfix - Note: self.limit could be -1

https://gerrit.wikimedia.org/r/131991

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links