http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10493
Revision: 10493 Author: xqt Date: 2012-08-22 16:59:37 +0000 (Wed, 22 Aug 2012) Log Message: ----------- remove unused get_redirect paramter from site.newpages and mark it as deprecated; yield page timestamp (update from trunk)
Modified Paths: -------------- branches/rewrite/pywikibot/site.py
Modified: branches/rewrite/pywikibot/site.py =================================================================== --- branches/rewrite/pywikibot/site.py 2012-08-19 16:18:31 UTC (rev 10492) +++ branches/rewrite/pywikibot/site.py 2012-08-22 16:59:37 UTC (rev 10493) @@ -2901,11 +2901,12 @@ imagepage._imageinfo = result["imageinfo"] return
- @deprecate_arg("number", None) + @deprecate_arg("number", step) @deprecate_arg("repeat", None) @deprecate_arg("namespace", "namespaces") @deprecate_arg("rc_show", None) - def newpages(self, get_redirect=False, user=None, returndict=False, + @deprecate_arg("get_redirect", None) #20120822 + def newpages(self, user=None, returndict=False, start=None, end=None, reverse=False, showBot=False, showRedirects=False, excludeuser=None, showPatrolled=None, namespaces=None, step=None, total=None): @@ -2940,8 +2941,8 @@ if returndict: yield (newpage, pageitem) else: - yield (newpage, pageitem['newlen'], u'', pageitem['user'], - pageitem['comment']) + yield (newpage, pageitem['timestamp'], pageitem['newlen'], + u'', pageitem['user'], pageitem['comment'])
@deprecate_arg("number", None) @deprecate_arg("repeat", None)