jenkins-bot has submitted this change and it was merged.
Change subject: reflink.py: deprecated latestRevision() replaced with latest_revision_id
......................................................................
reflink.py: deprecated latestRevision() replaced with latest_revision_id
Replaced deprecated Page.latestRevision() with Page.latest_revision_id.
Introduce new-style classes, subclassiing from object.
Change-Id: Idd343e3364a568b1056367daaba22f5f57b90b44
---
M scripts/reflinks.py
1 file changed, 5 insertions(+), 5 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/reflinks.py b/scripts/reflinks.py
index f7badef..70d6426 100644
--- a/scripts/reflinks.py
+++ b/scripts/reflinks.py
@@ -184,7 +184,7 @@
listof404pages = '404-links.txt'
-class XmlDumpPageGenerator:
+class XmlDumpPageGenerator(object):
"""Xml generator that yields pages containing bare
references."""
@@ -220,7 +220,7 @@
__next__ = next
-class RefLink:
+class RefLink(object):
"""Container to handle a single bare reference."""
@@ -293,7 +293,7 @@
self.title = self.title.title()
-class DuplicateReferences:
+class DuplicateReferences(object):
"""Helper to de-duplicate references in text.
@@ -446,7 +446,7 @@
self.norefbot = noreferences.NoReferencesBot(None, verbose=False)
self.deduplicator = DuplicateReferences()
try:
- self.stopPageRevId = self.stopPage.latestRevision()
+ self.stopPageRevId = self.stopPage.latest_revision_id
except pywikibot.NoPage:
pywikibot.output(u'The stop page %s does not exist'
% self.stopPage.title(asLink=True))
@@ -770,7 +770,7 @@
if editedpages % 20 == 0:
pywikibot.output(
'\03{lightgreen}Checking stop page...\03{default}')
- actualRev = self.stopPage.latestRevision()
+ actualRev = self.stopPage.latest_revision_id
if actualRev != self.stopPageRevId:
pywikibot.output(
u'[[%s]] has been edited : Someone wants us to stop.'
--
To view, visit
https://gerrit.wikimedia.org/r/192968
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idd343e3364a568b1056367daaba22f5f57b90b44
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>