jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1264674?usp=email )

Change subject: doc: Update ROADMAP.rst and docstrings of delete methods
......................................................................

doc: Update ROADMAP.rst and docstrings of delete methods

Change-Id: Icec2c0c45810e5fcf7e0c381fab48916c059889a
---
M ROADMAP.rst
M pywikibot/page/_basepage.py
M pywikibot/site/_apisite.py
3 files changed, 34 insertions(+), 5 deletions(-)

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




diff --git a/ROADMAP.rst b/ROADMAP.rst
index dcd4146..6c8ea4f 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -1,6 +1,9 @@
 Release 11.2
 ============

+* Implement *deletetalk* option in 
:meth:`APISite.delete()<pywikibot.site._apisite.APISite.delete>`
+  for older MediaWiki versions (:phab:`T420636`)
+* Add support for :mod:`abstract_family<families.abstract_family>` 
(:phab:`T420636`)
 * Do not follow interwiki redirects in :meth:`APISite.pagebacklinks()
   <pywikibot.site._generators.GeneratorsMixin.pagebacklinks>` (:phab:`T121833`)
 * Remove UTM tracking parameter in :meth:`pywikibot.FilePage.get_file_url` 
(:phab:`T420827`)
diff --git a/pywikibot/page/_basepage.py b/pywikibot/page/_basepage.py
index f5ad6ff..b382bcc 100644
--- a/pywikibot/page/_basepage.py
+++ b/pywikibot/page/_basepage.py
@@ -2049,6 +2049,16 @@
         .. version-changed:: 7.1
            keyword only parameter *deletetalk* was added.

+        .. version-changed:: 11.2
+           *deletetalk* option was implemented for MediaWiki < 1.38wmf24.
+
+        .. seealso::
+           - :meth:`undelete`
+           - :meth:`loadDeletedRevisions`
+           - :meth:`markDeletedRevision`
+           - :meth:`site.APISite.delete
+             <pywikibot.site._apisite.APISite.delete>`
+
         :param reason: The edit summary for the deletion, or rationale
             for deletion if requesting. If None, ask for it.
         :param prompt: If true, prompt user for confirmation before deleting.
@@ -2234,6 +2244,7 @@
             page.undelete('This will restore only selected revisions.')

         .. seealso::
+           - :meth:`delete`
            - :meth:`loadDeletedRevisions`
            - :meth:`markDeletedRevision`
            - :meth:`site.APISite.undelete
diff --git a/pywikibot/site/_apisite.py b/pywikibot/site/_apisite.py
index 7b483a6..76ea337 100644
--- a/pywikibot/site/_apisite.py
+++ b/pywikibot/site/_apisite.py
@@ -2644,8 +2644,6 @@

         Requires appropriate privileges.

-        .. seealso:: :api:`Delete`
-
         Page to be deleted can be given either as Page object or as pageid.
         To delete a specific version of an image the oldimage identifier
         must be provided.
@@ -2662,13 +2660,27 @@
         .. version-changed:: 8.1
            raises :exc:`exceptions.NoPageError` if page does not exist.

+        .. version-changed:: 11.2
+           *deletetalk* option was implemented for MediaWiki < 1.38wmf24.
+
+        .. seealso::
+           - :api:`Delete`
+           - :meth:`undelete`
+           - :meth:`page.BasePage.delete`
+
         :param page: Page to be deleted or its pageid.
         :param reason: Deletion reason.
         :param deletetalk: Also delete the talk page, if it exists.
         :param oldimage: Oldimage id of the file version to be deleted.
             If a BasePage object is given with page parameter, it has to
             be a FilePage.
-        :raises TypeError, ValueError: page has wrong type/value.
+        :raises TypeError: *oldimage* option is given but page object is
+            neither a page id nor a :class:`pywikibot.FilePage`.
+        :raises NoPageError: the *page* does not exists.
+        :raises Error: Any of the following conditions occurred:
+            noapiwrite, writeapidenied, permissiondenied, cantdelete,
+            nodeleteablefile.
+        :raises APIError: Any other API error occurred.
         """
         if oldimage and isinstance(page, pywikibot.page.BasePage) \
            and not isinstance(page, pywikibot.FilePage):
@@ -2751,8 +2763,6 @@
     ) -> None:
         """Undelete page from the wiki. Requires appropriate privilege level.

-        .. seealso:: :api:`Undelete`
-
         .. version-added:: 6.1
            renamed from `undelete_page`

@@ -2760,6 +2770,11 @@
            `fileids` parameter was added,
            keyword argument required for `revisions`.

+        .. seealso::
+           - :api:`Undelete`
+           - :meth:`delete`
+           - :meth:`page.BasePage.undelete`
+
         :param page: Page to be deleted.
         :param reason: Undeletion reason.
         :param revisions: List of timestamps to restore.

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

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Icec2c0c45810e5fcf7e0c381fab48916c059889a
Gerrit-Change-Number: 1264674
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to