jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/675345 )

Change subject: [FIX] Allow deleting any subclass of BasePage by title
......................................................................

[FIX] Allow deleting any subclass of BasePage by title

Also replace deprecated parameters

Bug: T278659
Change-Id: If587e793ddeeda6ffba07946f481c8220b96c357
---
M pywikibot/site/_apisite.py
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/site/_apisite.py b/pywikibot/site/_apisite.py
index fc63470..1756a15 100644
--- a/pywikibot/site/_apisite.py
+++ b/pywikibot/site/_apisite.py
@@ -2058,7 +2058,7 @@
         Page to be deleted can be given either as Page object or as pageid.

         @param page: Page to be deleted or its pageid.
-        @type page: Page or, in case of pageid, int or str
+        @type page: L{pywikibot.page.BasePage} or, for pageid, int or str
         @param reason: Deletion reason.
         @raises TypeError, ValueError: page has wrong type/value.

@@ -2066,9 +2066,9 @@
         token = self.tokens['delete']
         params = {'action': 'delete', 'token': token, 'reason': reason}

-        if isinstance(page, pywikibot.Page):
+        if isinstance(page, pywikibot.page.BasePage):
             params['title'] = page
-            msg = page.title(withSection=False)
+            msg = page.title(with_section=False)
         else:
             pageid = int(page)
             params['pageid'] = pageid
@@ -2116,7 +2116,7 @@

         if isinstance(page, pywikibot.Page):
             params['title'] = page
-            msg = page.title(withSection=False)
+            msg = page.title(with_section=False)
         else:
             pageid = int(page)
             params['pageid'] = pageid

-- 
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/675345
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: If587e793ddeeda6ffba07946f481c8220b96c357
Gerrit-Change-Number: 675345
Gerrit-PatchSet: 1
Gerrit-Owner: JJMC89 <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to