jenkins-bot has submitted this change and it was merged.
Change subject: site.py: Page.latestRevision() replaced with Page.latest_revision ......................................................................
site.py: Page.latestRevision() replaced with Page.latest_revision
Page.latestRevision() is deprecated, replaced with Page.latest_revision.
Change-Id: I941710c83dc15cff99f40885794a6ad42692d903 --- M pywikibot/site.py 1 file changed, 3 insertions(+), 7 deletions(-)
Approvals: XZise: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py index 525e98e..25ef04c 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -4057,7 +4057,7 @@ if text is None: raise Error("editpage: no text to be saved") try: - lastrev = page.latestRevision() + lastrev = page.latest_revision except NoPage: lastrev = None if not recreate: @@ -4070,10 +4070,6 @@ recreate=recreate, createonly=createonly, nocreate=nocreate, minor=minor, notminor=not minor and notminor) - if lastrev is not None: - if lastrev not in page._revisions: - self.loadrevisions(page) - params['basetimestamp'] = page._revisions[lastrev].timestamp
watch_items = set(["watch", "unwatch", "preferences", "nochange"]) if watch in watch_items: @@ -4314,7 +4310,7 @@ raise Error( u"Rollback of %s aborted; load revision history first." % page.title(asLink=True)) - last_rev = page._revisions[page.latestRevision()] + last_rev = page.latest_revision last_user = last_rev.user for rev in sorted(list(page._revisions.keys()), reverse=True): # start with most recent revision first @@ -5469,7 +5465,7 @@
params = dict(action='wbcreateclaim', entity=item.getID(), - baserevid=item.latestRevision(), + baserevid=item.latest_revision_id, snaktype=claim.getSnakType(), property=claim.getID(), )