jenkins-bot submitted this change.
[IMPR] use BasePage.templates() with Page.templatesWithParams
Page.templatesWithParams retrieves all templates. Therefore use
BasePage.templates() instead of BasePage.itertemplates() to cache
the templates. The caching was lost with 350760f in 9.2.0.
Change-Id: I44006564eaaf260b72d6caaebb1c09d7a55c90c9
---
M pywikibot/page/_page.py
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pywikibot/page/_page.py b/pywikibot/page/_page.py
index 8dcda60..b89bc2c 100644
--- a/pywikibot/page/_page.py
+++ b/pywikibot/page/_page.py
@@ -78,7 +78,7 @@
# WARNING: may not return all templates used in particularly
# intricate cases such as template substitution
titles = {t.title()
- for t in self.itertemplates(namespaces=Namespace.TEMPLATE)}
+ for t in self.templates(namespaces=Namespace.TEMPLATE)}
templates = self.raw_extracted_templates
# backwards-compatibility: convert the dict returned as the second
# element into a list in the format used by old scripts
To view, visit change 1048876. To unsubscribe, or for help writing mail filters, visit settings.