Page MenuHomePhabricator

PreloadingItemGenerator and DataSite.preloaditempages don't work with properties
Closed, ResolvedPublic

Description

>>> import pywikibot
>>> from pywikibot import pagegenerators
>>> repo = pywikibot.Site('wikidata', 'wikidata')
>>> gen = iter([pywikibot.PropertyPage(repo, 'P6')])
>>> list(pagegenerators.PreloadingItemGenerator(gen))
pywikibot.exceptions.InvalidTitle: 'P6' is not a valid item page title

There are other types of entites which we can iterate over, so it would be nice to have other types of entities supported.

Event Timeline

Properties are not items so I would say that this works as designed?

matej_suchanek updated the task description. (Show Details)

Yes, but we may need to reuse it for other types of entities (like properties).

Change 342588 had a related patch set (by Matěj Suchánek) published:
[pywikibot/core@master] [IMPR] Make preloading generators work with arbitrary entity types

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

Xqt claimed this task.
Xqt triaged this task as High priority.

Change 342588 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] Make preloading generators work with arbitrary entity types

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