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

Change subject: cleanup: remove APISite.article_path in favour of articlepath
......................................................................

cleanup: remove APISite.article_path in favour of articlepath

Bug: T378898
Change-Id: Ida09f5d1346483d2f76bb00d76d589b4fcab7bf6
---
M ROADMAP.rst
M pywikibot/site/_apisite.py
2 files changed, 4 insertions(+), 13 deletions(-)

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




diff --git a/ROADMAP.rst b/ROADMAP.rst
index ff740a1..1b9bebb 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -13,6 +13,8 @@

 **Code cleanups**

+* ``APISite.article_path`` was removed. :attr:`APISite.articlepath
+  <pywikibot.site._apisite.APISite.articlepath>` can be used instead.
 * ``fix_digits`` method of :class:`textlib.TimeStripper` was removed;
   :func:`textlib.to_latin_digits` can be used instead
 * :mod:`textlib`.tzoneFixedOffset class was removed in favour of
diff --git a/pywikibot/site/_apisite.py b/pywikibot/site/_apisite.py
index ea1de97..f538551 100644
--- a/pywikibot/site/_apisite.py
+++ b/pywikibot/site/_apisite.py
@@ -823,25 +823,14 @@
                 and self._useroptions[f'searchNs{ns.id}']
                 in ['1', True]}

-    @property  # type: ignore[misc]
-    @deprecated('articlepath', since='7.0.0')
-    def article_path(self) -> str:
-        """Get the nice article path without $1.
-
-        .. deprecated:: 7.0
-           Replaced by :py:meth:`articlepath`
-        """
-        return self.articlepath[:-2]
-
     @property
     def articlepath(self) -> str:
-        """Get the nice article path with placeholder.
+        """Get the nice article path with ``{}``placeholder.

         .. versionadded:: 7.0
-           Replaces :py:meth:`article_path`
         """
-        # Assert $1 placeholder is present
         path = self.siteinfo['general']['articlepath']
+        # Assert $1 placeholder is present
         assert '$1' in path, 'articlepath must contain "$1" placeholder'
         return path.replace('$1', '{}')


--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1101193?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: Ida09f5d1346483d2f76bb00d76d589b4fcab7bf6
Gerrit-Change-Number: 1101193
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <i...@gno.de>
Gerrit-Reviewer: Xqt <i...@gno.de>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- pywikibot-commits@lists.wikimedia.org
To unsubscribe send an email to pywikibot-commits-le...@lists.wikimedia.org

Reply via email to