Last modified: 2014-10-07 07:37:00 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/feature-requests/347/ Reported by: sk1d Created on: 2013-09-02 22:26:45.280000 Subject: preloadpagegenartor for wikidataitems Assigned to: legoktm Original description: Preloadpagegenerator with wikidataitems does not work. It seems you have to call pywikibot.page.Itempage.get() for each item after you get it from the generator. This should be obsolete as the item should already get loaded.
- **status**: open --> pending - **assigned_to**: Legoktm
See https://gerrit.wikimedia.org/r/#/c/80789/ (which won't work on the live site yet)
Looks promising!
Looks like this generator has been implemented: def PreloadingItemGenerator(generator, step=50): """ Yield preloaded pages taken from another generator. Function basically is copied from above, but for ItemPage's @param generator: pages to iterate over @param step: how many pages to preload at once """ But it contains a bug: The documentation says it expects a page generator, but in reality it expect an itempage generator. It should probably contain some logic to check for each page if it's an ItemPage already and otherwise make an itempage (like in WikidataItemGenerator)
Change 160438 had a related patch set uploaded by John Vandenberg: PreloadingItemGenerator: process normal pages https://gerrit.wikimedia.org/r/160438
Change 160438 merged by jenkins-bot: PreloadingItemGenerator: process normal pages https://gerrit.wikimedia.org/r/160438