jenkins-bot submitted this change.
cleanup: remove outdated code
Bug: T378898
Change-Id: If427c3fbfe902937e4fd3578f2b7c1d88296b9c0
---
M ROADMAP.rst
M docs/api_ref/pywikibot.site.rst
M pywikibot/page/_basepage.py
M pywikibot/site/_datasite.py
4 files changed, 24 insertions(+), 39 deletions(-)
diff --git a/ROADMAP.rst b/ROADMAP.rst
index 7a65372..1c9ed2d 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -14,10 +14,19 @@
**Code cleanups**
-* ``linktrail`` method of :class:`family.Family` was removed;
- use :meth:`APISite.linktrail()<pywikibot.site._apisite.APISite.linktrail>` instead
+* Unused *get_redirect* parameter of :meth:`BasePage.getOldVersion()<page.BasePage.getOldVersion>` was removed.
+* *baserevid* parameter of :class:`DataSite<pywikibot.site._datasite.DataSite>` methods
+ :meth:`editSource()<pywikibot.site._datasite.DataSite.editSource>`,
+ :meth:`editQualifier()<pywikibot.site._datasite.DataSite.editQualifier>`,
+ :meth:`removeClaims()<pywikibot.site._datasite.DataSite.removeClaims>`,
+ :meth:`removeSources()<pywikibot.site._datasite.DataSite.removeSources>`,
+ :meth:`remove_qualifiers()<pywikibot.site._datasite.DataSite.remove_qualifiers>` were be removed.
+* ``linktrail`` methods of :class:`family.Family` and :class:`BaseSite<pywikibot.site._basesite.BaseSite>`
+ were removed; use :meth:`APISite.linktrail()<pywikibot.site._apisite.APISite.linktrail>` instead.
* Positional arguments *decoder*, *layer* and *newline* for :mod:`logging` functions are invalid;
keyword arguments must be used instead.
+* *tb* parameter of :func:`exception()<pywikibot.logging.exception>` function was dropped;
+ use *exc_info* instead.
* The positional arguments of :meth:`page.BasePage.linkedPages` were removed.
* ``FilePage.usingPages()`` was renamed to :meth:`using_pages()<pywikibot.FilePage.using_pages>`.
* ``APISite.article_path`` was removed. :attr:`APISite.articlepath
@@ -119,7 +128,3 @@
-------------------------------
* 9.4.0: :mod:`flow` support is deprecated and will be removed (:phab:`T371180`)
-* 7.2.0: ``tb`` parameter of :func:`exception()<pywikibot.logging.exception>` function was renamed to ``exc_info``
-* 7.1.0: Unused ``get_redirect`` parameter of :meth:`Page.getOldVersion()<page.BasePage.getOldVersion>` will be removed
-* 7.0.0: baserevid parameter of editSource(), editQualifier(), removeClaims(), removeSources(), remove_qualifiers()
- DataSite methods will be removed
diff --git a/docs/api_ref/pywikibot.site.rst b/docs/api_ref/pywikibot.site.rst
index 7a34f79..220a568 100644
--- a/docs/api_ref/pywikibot.site.rst
+++ b/docs/api_ref/pywikibot.site.rst
@@ -19,19 +19,6 @@
.. autoclass:: BaseSite
- .. method:: linktrail()
-
- Return regex for trailing chars displayed as part of a link.
-
- .. note: Returns a string, not a compiled regular expression object.
- .. seealso:: :meth:`family.Family.linktrail`
- .. deprecated:: 7.3
- Only supported as :class:`APISite<pywikibot.site._apisite.APISite>`
- method. Use :meth:`APISite.linktrail()
- <pywikibot.site._apisite.APISite.linktrail>`
-
- :rtype: str
-
.. method:: category_redirects(fallback: str = '_default')
Return list of category redirect templates.
diff --git a/pywikibot/page/_basepage.py b/pywikibot/page/_basepage.py
index 8c9968c..10b6950 100644
--- a/pywikibot/page/_basepage.py
+++ b/pywikibot/page/_basepage.py
@@ -42,7 +42,6 @@
deprecated,
deprecated_args,
first_upper,
- remove_last_args,
)
@@ -455,10 +454,11 @@
self.site.loadrevisions(self, content=content, revids=oldid)
return self._revisions[oldid]
- @remove_last_args(['get_redirect'])
def getOldVersion(self, oldid, force: bool = False) -> str:
"""Return text of an old revision of this page.
+ .. versionchanged:: 10.0
+ The unused parameter *get_redirect* was removed.
.. seealso:: :meth:`get_revision`
:param oldid: The revid of the revision desired.
@@ -1526,8 +1526,6 @@
.. versionadded:: 7.0
the `follow_redirects` keyword argument.
- .. deprecated:: 7.0
- the positional arguments.
.. versionremoved:: 10.0
the positional arguments.
diff --git a/pywikibot/site/_datasite.py b/pywikibot/site/_datasite.py
index f07684e..fd27d56 100644
--- a/pywikibot/site/_datasite.py
+++ b/pywikibot/site/_datasite.py
@@ -25,7 +25,7 @@
)
from pywikibot.site._apisite import APISite
from pywikibot.site._decorators import need_extension, need_right
-from pywikibot.tools import deprecated, merge_unique_dicts, remove_last_args
+from pywikibot.tools import deprecated, merge_unique_dicts
__all__ = ('DataSite', )
@@ -476,7 +476,6 @@
return data
@need_right('edit')
- @remove_last_args(['baserevid']) # since 7.0.0
def editSource(self,
claim: pywikibot.Claim,
source: pywikibot.Claim,
@@ -486,10 +485,10 @@
tags: str | None = None):
"""Create/Edit a source.
- .. versionchanged:: 7.0
- deprecated *baserevid* parameter was removed
.. versionchanged:: 9.4
*tags* parameter was added
+ .. versionchanged:: 10.0
+ deprecated *baserevid* parameter was removed
:param claim: A Claim object to add the source to.
:param source: A Claim object to be used as a source.
@@ -537,7 +536,6 @@
return req.submit()
@need_right('edit')
- @remove_last_args(['baserevid']) # since 7.0.0
def editQualifier(self,
claim: pywikibot.Claim,
qualifier: pywikibot.Claim,
@@ -547,10 +545,10 @@
tags: str | None = None):
"""Create/Edit a qualifier.
- .. versionchanged:: 7.0
- deprecated *baserevid* parameter was removed
.. versionchanged:: 9.4
*tags* parameter was added
+ .. versionchanged:: 10.0
+ deprecated *baserevid* parameter was removed
:param claim: A Claim object to add the qualifier to
:param qualifier: A Claim object to be used as a qualifier
@@ -589,7 +587,6 @@
return req.submit()
@need_right('edit')
- @remove_last_args(['baserevid']) # since 7.0.0
def removeClaims(self,
claims: list[pywikibot.Claim],
bot: bool = True,
@@ -597,10 +594,10 @@
tags: str | None = None):
"""Remove claims.
- .. versionchanged:: 7.0
- deprecated *baserevid* parameter was removed
.. versionchanged:: 9.4
*tags* parameter was added
+ .. versionchanged:: 10.0
+ deprecated *baserevid* parameter was removed
:param claims: Claims to be removed
:param bot: Whether to mark the edit as a bot edit
@@ -626,7 +623,6 @@
return req.submit()
@need_right('edit')
- @remove_last_args(['baserevid']) # since 7.0.0
def removeSources(self,
claim: pywikibot.Claim,
sources: list[pywikibot.Claim],
@@ -635,10 +631,10 @@
tags: str | None = None):
"""Remove sources.
- .. versionchanged:: 7.0
- deprecated `baserevid` parameter was removed
.. versionchanged:: 9.4
*tags* parameter was added
+ .. versionchanged:: 10.0
+ deprecated `baserevid` parameter was removed
:param claim: A Claim object to remove the sources from
:param sources: A list of Claim objects that are sources
@@ -661,7 +657,6 @@
return req.submit()
@need_right('edit')
- @remove_last_args(['baserevid']) # since 7.0.0
def remove_qualifiers(self,
claim: pywikibot.Claim,
qualifiers: list[pywikibot.Claim],
@@ -670,10 +665,10 @@
tags: str | None = None):
"""Remove qualifiers.
- .. versionchanged:: 7.0
- deprecated `baserevid` parameter was removed
.. versionchanged:: 9.4
*tags* parameter was added
+ .. versionchanged:: 10.0
+ deprecated `baserevid` parameter was removed
:param claim: A Claim object to remove the qualifier from
:param qualifiers: Claim objects currently used as a qualifiers
To view, visit change 1101206. To unsubscribe, or for help writing mail filters, visit settings.