Run this code:
>>> import pywikibot >>> repo = pywikibot.Site('wikidata', 'wikidata') >>> item = pywikibot.ItemPage(repo, 'Q16503') >>> data = item.get()
The last line will take many seconds while the respective API call takes a while. The reason is that during this operation all sitelinks are initialized AND (some of them) parsed in SiteLink._parse_namespace which a) creates a new site object via APISite.fromDBName (not a cached one as pywikibot.Site would do), b) does an API call for each site to get the namespace information (this can be very slow for many sites). Note that combination of both caused my bot to crash on MemoryError, with trace to these methods.
This all is quite unexpected for bot operators who don't care about sitelinks (or who do but not about what namespace they link to). Some lazy initialization should be introduced, probably in all fromDBName, SiteLink and ItemPage.