Last modified: 2014-09-08 01:56:47 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1257/ Reported by: tgr_ Created on: 2010-10-31 10:39:27 Subject: Page.templates() cache does not respect get_redirect Original description: Steps to reproduce: page = wikipedia.Page\(someSite, someRedirect\) page.templates\(\) \# returns \[\] page.templates\(get\_redirect=True\) \# returns \[\] from cache even if the page does have templates Pywikipedia \[http\] trunk/pywikipedia \(r8690, 2010/10/28, 15:34:19\) Python 2.6.5 \(r265:79096, Mar 19 2010, 21:48:26\) \[MSC v.1500 32 bit \(Intel\)\] config-settings: use\_api = True use\_api\_login = True unicode test: ok
*** Bug 55227 has been marked as a duplicate of this bug. ***
TEST SCRIPT: import pywikibot p = pywikibot.Page(pywikibot.getSite("en", "wikipedia"), "Wikipedia:K") print p.templates() print p.templates(get_redirect=True) p = pywikibot.Page(pywikibot.getSite("en", "wikipedia"), "Wikipedia:K") print p.templates(get_redirect=True) CONFIRMED on compat: Pywikibot: [https] r/pywikibot/co (r10375, 80b6c36, 2013/10/25, 20:37:20, ok) The bug does not exist on core because the API is different (in an incompatible way, see bug 56188