jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1048876?usp=email )

Change subject: [IMPR] use BasePage.templates() with Page.templatesWithParams
......................................................................

[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(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified




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 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1048876?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I44006564eaaf260b72d6caaebb1c09d7a55c90c9
Gerrit-Change-Number: 1048876
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to