Mpaa has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/192968

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


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/68/192968/1

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: newchange
Gerrit-Change-Id: Idd343e3364a568b1056367daaba22f5f57b90b44
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa <mpaa.w...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to