jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1251265?usp=email )
Change subject: doc: Replace Sphinx directives describing changes between versions
......................................................................
doc: Replace Sphinx directives describing changes between versions
versionadded -> version-added
versionchanged -> version-changed
deprecated -> version-deprecated
versionremoved -> version-removed
Bug: T419917
Change-Id: I16795c27669e9b977110b1cff8dabeef16bf0c9d
---
M conftest.py
M docs/api_ref/family.rst
M docs/api_ref/pywikibot.site.rst
M docs/api_ref/tools/tools.itertools.rst
M docs/api_ref/tools/tools.threading.rst
M docs/conf.py
M docs/introduction.rst
M docs/scripts/archive.rst
M make_dist.py
M pwb.py
M pywikibot/__init__.py
M pywikibot/__metadata__.py
M pywikibot/_wbtypes.py
M pywikibot/backports.py
M pywikibot/bot.py
M pywikibot/bot_choice.py
M pywikibot/comms/eventstreams.py
M pywikibot/comms/http.py
M pywikibot/config.py
M pywikibot/cosmetic_changes.py
M pywikibot/daemonize.py
M pywikibot/data/__init__.py
M pywikibot/data/api/_generators.py
M pywikibot/data/api/_optionset.py
M pywikibot/data/api/_paraminfo.py
M pywikibot/data/api/_requests.py
M pywikibot/data/citoid.py
M pywikibot/data/memento.py
M pywikibot/data/sparql.py
M pywikibot/data/superset.py
M pywikibot/data/wikistats.py
M pywikibot/date.py
M pywikibot/diff.py
M pywikibot/echo.py
M pywikibot/editor.py
M pywikibot/exceptions.py
M pywikibot/families/commons_family.py
M pywikibot/families/foundation_family.py
M pywikibot/families/lingualibre_family.py
M pywikibot/families/meta_family.py
M pywikibot/families/wikifunctions_family.py
M pywikibot/families/wikihow_family.py
M pywikibot/families/wikimania_family.py
M pywikibot/families/wikipedia_family.py
M pywikibot/families/wikispore_family.py
M pywikibot/families/wiktionary_family.py
M pywikibot/families/wowwiki_family.py
M pywikibot/family.py
M pywikibot/fixes.py
M pywikibot/i18n.py
M pywikibot/interwiki_graph.py
M pywikibot/logentries.py
M pywikibot/logging.py
M pywikibot/login.py
M pywikibot/page/_basepage.py
M pywikibot/page/_category.py
M pywikibot/page/_collections.py
M pywikibot/page/_filepage.py
M pywikibot/page/_links.py
M pywikibot/page/_page.py
M pywikibot/page/_toolforge.py
M pywikibot/page/_user.py
M pywikibot/page/_wikibase.py
M pywikibot/pagegenerators/__init__.py
M pywikibot/pagegenerators/_factory.py
M pywikibot/pagegenerators/_generators.py
M pywikibot/plural.py
M pywikibot/proofreadpage.py
M pywikibot/scripts/__init__.py
M pywikibot/scripts/generate_family_file.py
M pywikibot/scripts/generate_user_files.py
M pywikibot/scripts/login.py
M pywikibot/scripts/shell.py
M pywikibot/scripts/version.py
M pywikibot/scripts/wrapper.py
M pywikibot/site/_apisite.py
M pywikibot/site/_basesite.py
M pywikibot/site/_datasite.py
M pywikibot/site/_extensions.py
M pywikibot/site/_generators.py
M pywikibot/site/_namespace.py
M pywikibot/site/_siteinfo.py
M pywikibot/site/_tokenwallet.py
M pywikibot/site/_upload.py
M pywikibot/site_detect.py
M pywikibot/specialbots/_upload.py
M pywikibot/textlib.py
M pywikibot/throttle.py
M pywikibot/time.py
M pywikibot/titletranslate.py
M pywikibot/tools/__init__.py
M pywikibot/tools/_deprecate.py
M pywikibot/tools/chars.py
M pywikibot/tools/collections.py
M pywikibot/tools/formatter.py
M pywikibot/tools/itertools.py
M pywikibot/tools/threading.py
M pywikibot/userinterfaces/_interface_base.py
M pywikibot/userinterfaces/buffer_interface.py
M pywikibot/userinterfaces/gui.py
M pywikibot/userinterfaces/terminal_interface_base.py
M pywikibot/userinterfaces/transliteration.py
M pywikibot/version.py
M pywikibot/xmlreader.py
M scripts/archivebot.py
M scripts/blockpageschecker.py
M scripts/category.py
M scripts/category_graph.py
M scripts/category_redirect.py
M scripts/change_pagelang.py
M scripts/checkimages.py
M scripts/commons_information.py
M scripts/commonscat.py
M scripts/coordinate_import.py
M scripts/cosmetic_changes.py
M scripts/delinker.py
M scripts/djvutext.py
M scripts/download_dump.py
M scripts/harvest_template.py
M scripts/interwiki.py
M scripts/interwikidata.py
M scripts/maintenance/__init__.py
M scripts/maintenance/addwikis.py
M scripts/maintenance/cache.py
M scripts/maintenance/unidata.py
M scripts/movepages.py
M scripts/noreferences.py
M scripts/nowcommons.py
M scripts/pagefromfile.py
M scripts/protect.py
M scripts/redirect.py
M scripts/reflinks.py
M scripts/replace.py
M scripts/revertbot.py
M scripts/touch.py
M scripts/tracking_param_remover.py
M scripts/transwikiimport.py
M scripts/unlink.py
M scripts/unusedfiles.py
M scripts/watchlist.py
M scripts/welcome.py
M setup.py
M tests/README.rst
M tests/aspects.py
M tests/basepage.py
M tests/gui_tests.py
M tests/hooks/__init__.py
M tests/hooks/copyright_fixer.py
M tests/pwb/print_argv.py
M tests/superset_tests.py
M tests/utils.py
151 files changed, 918 insertions(+), 918 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/conftest.py b/conftest.py
index eb2115d..59c66b9 100644
--- a/conftest.py
+++ b/conftest.py
@@ -5,7 +5,7 @@
#
"""Configuration file for pytest.
-.. versionadded:: 10.3
+.. version-added:: 10.3
"""
from __future__ import annotations
@@ -87,7 +87,7 @@
If the option is given without parameter, the default value is 0.5
seconds.
- .. versionadded:: 11.0
+ .. version-added:: 11.0
:param parser: The pytest parser object used to add CLI options.
:type parser: _pytest.config.argparsing.Parser
@@ -109,7 +109,7 @@
def pause_between_doctests(request) -> None:
"""Insert a pause after each doctest if enabled.
- .. versionadded:: 11.0
+ .. version-added:: 11.0
:param request: The pytest FixtureRequest object providing test
context.
diff --git a/docs/api_ref/family.rst b/docs/api_ref/family.rst
index d6f6e08..25cb8ea 100644
--- a/docs/api_ref/family.rst
+++ b/docs/api_ref/family.rst
@@ -37,15 +37,15 @@
aliases['yue'] = 'zh-yue'
cls.code_aliases = aliases
- .. versionadded:: 8.3
+ .. version-added:: 8.3
.. method:: nicepath(code)
Return nice path prefix, e.g. `'/wiki/'`.
- .. deprecated:: 2.0
+ .. version-deprecated:: 2.0
Use :meth:`APISite.articlepath<pywikibot.site._apisite.APISite.articlepath>` instead.
- .. versionremoved:: 5.4
+ .. version-removed:: 5.4
:param str code: The site code
:rtype: str
diff --git a/docs/api_ref/pywikibot.site.rst b/docs/api_ref/pywikibot.site.rst
index bbacc29..81fd1f1 100644
--- a/docs/api_ref/pywikibot.site.rst
+++ b/docs/api_ref/pywikibot.site.rst
@@ -34,7 +34,7 @@
Return tuple of edit restricted templates.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
.. seealso:: :meth:`family.Family.get_edit_restricted_templates`
:rtype: tuple[str, ...]
@@ -44,7 +44,7 @@
Return tuple of edit restricted templates.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
.. seealso:: :meth:`family.Family.get_archived_page_templates`
:rtype: tuple[str, ...]
@@ -67,7 +67,7 @@
May be overridden to return 'http'. Other protocols are not
supported.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
``https`` is returned instead of ``http``.
.. seealso:: :meth:`family.Family.protocol`
@@ -109,11 +109,11 @@
Using *namespace* option different from ``0``
needs a lot of time on Wikidata site.
- .. deprecated:: 10.7
+ .. version-deprecated:: 10.7
This method is dysfunctional and should no longer be used. It
will be removed in Pywikibot 11.
- .. versionremoved:: 11.0
+ .. version-removed:: 11.0
This method was dysfunctional and removed, see the following tickets for details:
:phab:`T359427`, :phab:`T364617` and :phab:`T407708`
diff --git a/docs/api_ref/tools/tools.itertools.rst b/docs/api_ref/tools/tools.itertools.rst
index 9aa7746..64bc794 100644
--- a/docs/api_ref/tools/tools.itertools.rst
+++ b/docs/api_ref/tools/tools.itertools.rst
@@ -10,9 +10,9 @@
Make an iterator that returns lists of (up to) *size* items from *iterable*.
- .. versionadded:: 7.6
+ .. version-added:: 7.6
The *strict* parameter.
- .. deprecated:: 8.2
+ .. version-deprecated:: 8.2
Use :func:`backports.batched` instead.
- .. versionremoved:: 11.0
+ .. version-removed:: 11.0
This function was removed; use :pylib:`itertools.batched<itertools#itertools.batched>` instead.
diff --git a/docs/api_ref/tools/tools.threading.rst b/docs/api_ref/tools/tools.threading.rst
index c1ef728..5e8bd77 100644
--- a/docs/api_ref/tools/tools.threading.rst
+++ b/docs/api_ref/tools/tools.threading.rst
@@ -6,5 +6,5 @@
.. autoclass:: RLock
- .. deprecated:: 10.2
+ .. version-deprecated:: 10.2
use :mod:`backports.RLock` instead
diff --git a/docs/conf.py b/docs/conf.py
index ac33cd5..dc02ef8 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -524,7 +524,7 @@
..note: These links point directly to diffusion repository.
.. seealso:: :phab:`T333762`
- .. versionadded:: 11.0
+ .. version-added:: 11.0
"""
if domain != 'py':
return None
@@ -575,7 +575,7 @@
def pywikibot_docstring_fixups(app, what, name, obj, options, lines) -> None:
"""Remove plain 'Initializer.' or 'Allocator.' docstring.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
remove 'Allocator.' docstring too.
"""
if what not in ('class', 'exception'):
diff --git a/docs/introduction.rst b/docs/introduction.rst
index 70bf537..de11f04 100644
--- a/docs/introduction.rst
+++ b/docs/introduction.rst
@@ -35,7 +35,7 @@
#. fallback is `'en'` for English if all other options fails
.. note:: The preferred language code must follow ISO 639.
-.. versionadded:: 7.0
+.. version-added:: 7.0
Added to site-package distribution
.. seealso::
* :manpage:`i18n` Manual
diff --git a/docs/scripts/archive.rst b/docs/scripts/archive.rst
index 9877db6..4481c24 100644
--- a/docs/scripts/archive.rst
+++ b/docs/scripts/archive.rst
@@ -70,7 +70,7 @@
amend the related Wikidata item for edition (with the
:samp:`P212, {ISBN number}` as unique external ID).
-.. versionremoved:: 11.0
+.. version-removed:: 11.0
An external version of this script can be found in the
`geertivp/Pywikibot <https://github.com/geertivp/Pywikibot>`_ script
collection. See :phab:`T398140` for details.
@@ -118,8 +118,8 @@
cases where a more precise and less precise value have both been
included.
-.. versionadded:: 7.2
-.. versionremoved:: 10.0
+.. version-added:: 7.2
+.. version-removed:: 10.0
disambredirs script
===================
diff --git a/make_dist.py b/make_dist.py
index 24a6427..51f3f2b 100755
--- a/make_dist.py
+++ b/make_dist.py
@@ -32,28 +32,28 @@
[pwb] make_dist [repo] [options]
-.. versionadded:: 7.3
-.. versionchanged:: 7.4
+.. version-added:: 7.3
+.. version-changed:: 7.4
- updates pip, setuptools, wheel and twine packages first
- installs pre-releases over stable versions
- also creates built distribution together with source distribution
- *-upgrade* option was added
-.. versionchanged:: 7.5
+.. version-changed:: 7.5
- *clear* option was added
- *nodist* option was added
-.. versionchanged:: 8.1
+.. version-changed:: 8.1
*nodist* option was removed, *clear* option does not create a
distribution. *local* and *remote* option clears old distributions
first.
-.. versionchanged:: 8.2
+.. version-changed:: 8.2
Build frontend was changed from setuptools to build. ``-upgrade``
option also installs packages if necessary.
-.. versionchanged:: 9.4
+.. version-changed:: 9.4
The pywikibot-scripts distribution can be created.
"""
from __future__ import annotations
@@ -75,8 +75,8 @@
"""Setup distribution base class.
- .. versionadded:: 8.0
- .. versionchanged:: 8.1
+ .. version-added:: 8.0
+ .. version-changed:: 8.1
*dataclass* is used.
"""
@@ -95,7 +95,7 @@
def clear_old_dist(self) -> None: # pragma: no cover
"""Delete old dist folders.
- .. versionadded:: 7.5
+ .. version-added:: 7.5
"""
info('<<lightyellow>>Removing old dist folders... ', newline=False)
shutil.rmtree(self.folder / 'build', ignore_errors=True)
@@ -146,7 +146,7 @@
def build(self) -> bool: # pragma: no cover
"""Build the packages.
- .. versionadded:: 9.3
+ .. version-added:: 9.3
"""
self.copy_files()
info('<<lightyellow>>Build package')
@@ -178,7 +178,7 @@
"""Setup for Pywikibot distribution.
- .. versionadded:: 8.0
+ .. version-added:: 8.0
"""
build_opt = '' # defaults to current directory
@@ -221,7 +221,7 @@
"""Setup pywikibot-scripts distribution.
- .. versionadded:: 9.4
+ .. version-added:: 9.4
"""
build_opt = '-w' # only wheel (yet)
diff --git a/pwb.py b/pwb.py
index 02d55dd..21a9bd8 100755
--- a/pwb.py
+++ b/pwb.py
@@ -6,7 +6,7 @@
#
"""PWB caller script to invoke the :mod:`pywikibot.scripts.wrapper` script.
-.. versionadded:: 8.0
+.. version-added:: 8.0
"""
import runpy
import sys
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index b2e8969..09f35cc 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -182,16 +182,16 @@
.. warning:: Never create a site object via interface class directly.
Always use this factory method.
- .. versionchanged:: 5.6
+ .. version-changed:: 5.6
If a family file does not fit the given *url*, an
:class:`family.AutoFamily` is used to create the site.
- .. versionchanged:: 7.3
+ .. version-changed:: 7.3
Short creation if site code is equal to family name like
`Site('commons')`, `Site('meta')` or `Site('wikidata')`.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
*url* does not have to contain an api, requests or script path
any longer.
- .. versionchanged:: 10.3
+ .. version-changed:: 10.3
accept a trailing slash in *url* after domain.
:param code: Site code (override config.mylang); *code* may also be
@@ -403,7 +403,7 @@
def async_manager(*, block=True) -> None:
"""Daemon to take requests from the queue and execute them in background.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
*block* must be given as keyword argument.
:param block: If true, block :attr:`page_put_queue` if necessary
diff --git a/pywikibot/__metadata__.py b/pywikibot/__metadata__.py
index 19f110d..b79d48a 100644
--- a/pywikibot/__metadata__.py
+++ b/pywikibot/__metadata__.py
@@ -5,7 +5,7 @@
#
"""Pywikibot metadata file.
-.. versionadded:: 4.0
+.. version-added:: 4.0
"""
from __future__ import annotations
diff --git a/pywikibot/_wbtypes.py b/pywikibot/_wbtypes.py
index 6479fbb..891b287 100644
--- a/pywikibot/_wbtypes.py
+++ b/pywikibot/_wbtypes.py
@@ -79,7 +79,7 @@
def __repr__(self) -> str:
"""String representation of this object.
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
Parameters are shown as representations instead of plain
strings.
@@ -126,7 +126,7 @@
) -> None:
"""Represent a geo coordinate.
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
The parameters after `lat` and `lon` are now keyword-only.
:param lat: Latitude coordinate
@@ -332,7 +332,7 @@
A successful lookup is stored as an internal value to avoid the
need for repeated lookups.
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
The *lazy_load* parameter is now keyword-only.
:param repo: The Wikibase site for the globe, if different from
@@ -472,11 +472,11 @@
the equality operator will return false if the timezone is
different.
- .. deprecated:: 10.0
+ .. version-deprecated:: 10.0
*precision* value 'millenia' is deprecated; 'millennium' must
be used instead.
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
The parameters except timestamp values are now keyword-only.
A TypeError is raised if *year* is not an int. Previously, a
ValueError was raised if *year* was None.
@@ -561,7 +561,7 @@
This value should *only* be used for comparisons, and its value
may change without warning.
- .. versionadded:: 8.0
+ .. version-added:: 8.0
:return: An integer roughly representing the number of seconds
since January 1, 0000 AD, adjusted for leap years.
@@ -597,7 +597,7 @@
def __lt__(self, other: object) -> bool:
"""Compare if self is less than other.
- .. versionadded:: 8.0
+ .. version-added:: 8.0
"""
if isinstance(other, WbTime):
return self._getSecondsAdjusted() < other._getSecondsAdjusted()
@@ -606,7 +606,7 @@
def __le__(self, other: object) -> bool:
"""Compare if self is less equals other.
- .. versionadded:: 8.0
+ .. version-added:: 8.0
"""
if isinstance(other, WbTime):
return self._getSecondsAdjusted() <= other._getSecondsAdjusted()
@@ -615,7 +615,7 @@
def __gt__(self, other: object) -> bool:
"""Compare if self is greater than other.
- .. versionadded:: 8.0
+ .. version-added:: 8.0
"""
if isinstance(other, WbTime):
return self._getSecondsAdjusted() > other._getSecondsAdjusted()
@@ -624,7 +624,7 @@
def __ge__(self, other: object) -> bool:
"""Compare if self is greater equals other.
- .. versionadded:: 8.0
+ .. version-added:: 8.0
"""
if isinstance(other, WbTime):
return self._getSecondsAdjusted() >= other._getSecondsAdjusted()
@@ -641,7 +641,7 @@
with == with a time at 15:00 UTC, but would return true with
this method.
- .. versionadded:: 9.0
+ .. version-added:: 9.0
"""
return self._getSecondsAdjusted() == other._getSecondsAdjusted()
@@ -669,7 +669,7 @@
- Time is always in UTC and ends with ``Z``.
- Example: ``+0000000000123456-01-01T00:00:00Z``.
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
The parameters except *datetimestr* are now keyword-only.
:param datetimestr: Timestamp string to parse
@@ -713,9 +713,9 @@
) -> WbTime:
"""Create a new WbTime object from a pywikibot.Timestamp.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
Added *copy_timezone* parameter.
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
The parameters except *timestamp* are now keyword-only.
@@ -749,7 +749,7 @@
The rounding is performed towards positive infinity for positive
years and towards negative infinity for negative years.
- .. versionadded:: 10.4
+ .. version-added:: 10.4
:param year: The year as an integer.
:return: The first year of the millennium containing the given
@@ -772,7 +772,7 @@
The rounding is performed towards positive infinity for positive
years and towards negative infinity for negative years.
- .. versionadded:: 10.4
+ .. version-added:: 10.4
:param year: The year as an integer.
:return: The first year of the century containing the given year.
@@ -793,7 +793,7 @@
Unlike millennium or century normalization, this always
truncates towards zero.
- .. versionadded:: 10.4
+ .. version-added:: 10.4
:param year: The year as an integer.
:return: The first year of the decade containing the given year.
@@ -811,7 +811,7 @@
This is used for very coarse historical precision levels, where
the time unit represents a power-of-ten number of years.
- .. versionadded:: 10.4
+ .. version-added:: 10.4
:param year: The year as an integer.
:param precision: The precision level (Wikibase int value).
@@ -879,9 +879,9 @@
.. seealso:: :meth:`fromTimestr` for differences between output
with and without *force_iso* parameter.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
*normalize* parameter was added.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
*normalize* parameter was removed due to :phab:`T340495` and
:phab:`T57755`
@@ -898,7 +898,7 @@
def toTimestamp(self, timezone_aware: bool = False) -> Timestamp:
"""Convert the data to a pywikibot.Timestamp.
- .. versionchanged:: 8.0.1
+ .. version-changed:: 8.0.1
*timezone_aware* parameter was added.
:param timezone_aware: Whether the timezone should be passed to
@@ -918,9 +918,9 @@
def toWikibase(self) -> dict[str, Any]:
"""Convert the data to a JSON object for the Wikibase API.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
*normalize* parameter was added.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
*normalize* parameter was removed due to :phab:`T340495` and
:phab:`T57755`
@@ -1304,8 +1304,8 @@
This data type is just a json container
- .. versionadded:: 3.0
- .. versionchanged:: 9.4
+ .. version-added:: 3.0
+ .. version-changed:: 9.4
*warning* parameter was added
"""
@@ -1324,7 +1324,7 @@
def toWikibase(self) -> dict[str, Any]:
"""Return the JSON object for the Wikibase API.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
a waning message given by the warning attribute is shown once.
:return: Wikibase JSON
diff --git a/pywikibot/backports.py b/pywikibot/backports.py
index 683825e..01ce70e 100644
--- a/pywikibot/backports.py
+++ b/pywikibot/backports.py
@@ -9,7 +9,7 @@
Breaking changes may be made at any time, and the module is not
subject to deprecation requirements.
-.. versionchanged:: 10.0
+.. version-changed:: 10.0
This module is 'private'.
"""
from __future__ import annotations
@@ -36,7 +36,7 @@
.. seealso:: :python:`itertools.pairwise
<library/itertools.html#itertools.pairwise>`,
backported from Python 3.10.
- .. versionadded:: 7.6
+ .. version-added:: 7.6
"""
a, b = tee(iterable)
next(b, None)
@@ -81,8 +81,8 @@
.. seealso:: :python:`itertools.batched
<library/itertools.html#itertools.batched>`,
backported from Python 3.12.
- .. versionadded:: 8.2
- .. versionchanged:: 9.0
+ .. version-added:: 8.2
+ .. version-changed:: 9.0
Added *strict* option, backported from Python 3.13
:param n: How many items of the iterable to get in one chunk
@@ -148,8 +148,8 @@
>>> lock.locked()
False
- .. versionadded:: 6.2
- .. versionchanged:: 10.2
+ .. version-added:: 6.2
+ .. version-changed:: 10.2
moved from :mod:`tools.threading` to :mod:`backports`.
.. note:: Passing any arguments has no effect and has been
deprecated since Python 3.14 and was removed in Python 3.15.
@@ -187,7 +187,7 @@
def count(self):
"""Return number of acquired locks.
- .. deprecated:: 10.2
+ .. version-deprecated:: 10.2
"""
with self._block:
counter = re.search(r'count=(\d+) ', repr(self))
diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 9691741..28de24b 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -60,7 +60,7 @@
subclasses :class:`CurrentPageBot` and automatically defines the summary
when :meth:`put_current` is used.
-.. deprecated:: 9.2
+.. version-deprecated:: 9.2
The functions
:func:`critical()<pywikibot.logging.critical>`
:func:`debug()<pywikibot.logging.debug>`
@@ -79,7 +79,7 @@
within this module. Import them directly. These functions can also be
used as :mod:`pywikibot` members.
-.. versionremoved:: 10.0
+.. version-removed:: 10.0
The bot classes :class:`RedirectPageBot` and
:class:`NoRedirectPageBot` are deprecated. Use
:attr:`use_redirects<BaseBot.use_redirects>` attribute instead.
@@ -290,7 +290,7 @@
Calls :func:`init_handlers` to re-initialize if we were already
initialized with another UI.
- .. versionadded:: 6.4
+ .. version-added:: 6.4
"""
global ui
@@ -321,7 +321,7 @@
>>> handler_namer('add_text.log.1')
'add_text.1.log'
- .. versionadded:: 6.5
+ .. version-added:: 6.5
"""
path, qualifier = name.rsplit('.', 1)
root, ext = os.path.splitext(path)
@@ -368,7 +368,7 @@
use :func:`pywikibot.info()<pywikibot.logging.info>` function and
other functions from :mod:`pywikibot.logging` module.
- .. versionchanged:: 6.2
+ .. version-changed:: 6.2
Different logfiles are used if multiple processes of the same
script are running.
"""
@@ -467,7 +467,7 @@
This may help the user to track errors or report bugs.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
ignore milliseconds with timestamp.
"""
_log(f'\n=== Pywikibot framework v{pywikibot.__version__} --'
@@ -540,7 +540,7 @@
def initialize_handlers(function):
"""Make sure logging system has been initialized.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
"""
@wraps(function)
def wrapper(*args, **kwargs):
@@ -669,7 +669,7 @@
docstring and because the module name will be used for the filename
of the log.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
Detect unittest and pytest run and return the test module.
"""
mod = pywikibot.argvu[0]
@@ -723,19 +723,19 @@
be used even if the `handle_args` method is used within the
script.
- .. versionchanged:: 5.2
+ .. version-changed:: 5.2
``-site`` global option was added
- .. versionchanged:: 7.1
+ .. version-changed:: 7.1
``-cosmetic_changes`` and ``-cc`` may be set directly instead of
toggling the value. Refer :func:`tools.strtobool` for valid values.
- .. versionchanged:: 7.7
+ .. version-changed:: 7.7
``-config`` global option was added.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
Short site value can be given if site code is equal to family
like ``-site:meta``.
- .. versionchanged:: 8.1
+ .. version-changed:: 8.1
``-nolog`` option also discards command.log.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
``-lang`` option was replaced by ``-code`` but kept for backward
compatibility.
@@ -881,9 +881,9 @@
show_global: bool = False) -> None:
"""Show help for the Bot.
- .. versionchanged:: 4.0
+ .. version-changed:: 4.0
Renamed from showHelp() to show_help().
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
Do not show version changes.
"""
if not module_name:
@@ -989,7 +989,7 @@
def open_webbrowser(page: pywikibot.page.BasePage) -> None:
"""Open the web browser displaying the page and wait for input.
- .. versionchanged:: 10.1
+ .. version-changed:: 10.1
No longer follow a redirect.
"""
webbrowser.open(f'{page.full_url()}?redirect=no')
@@ -1000,7 +1000,7 @@
"""The option dict which holds the options of OptionHandler.
- .. versionadded:: 4.1
+ .. version-added:: 4.1
"""
def __init__(self, classname: str, options: dict[str, Any]) -> None:
@@ -1120,7 +1120,7 @@
For bot options handling refer :class:`OptionHandler` class above.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
A :attr:`counter` instance variable is provided.
"""
@@ -1129,7 +1129,7 @@
True to use disambigs only, set it to False to skip disambigs. If None both
are processed.
- .. versionadded:: 7.2
+ .. version-added:: 7.2
"""
use_redirects: bool | None = None
@@ -1146,7 +1146,7 @@
use_redirects = True
- .. versionadded:: 7.2
+ .. version-added:: 7.2
"""
available_options = {
@@ -1158,7 +1158,7 @@
use it if the bot class is to be derived but use
`self.available_options.update(<dict>)` initializer in such case.
- .. versionadded:: 6.4
+ .. version-added:: 6.4
"""
_current_page: pywikibot.page.BasePage | None = None
@@ -1187,8 +1187,8 @@
self.counter['delete'] += 1
- .. versionadded:: 7.0
- .. versionchanged:: 7.3
+ .. version-added:: 7.0
+ .. version-changed:: 7.3
Your additional counters are also printed during :meth:`exit`
"""
@@ -1207,15 +1207,15 @@
print('generator was emtpty')
.. note:: An empty generator returns True.
- .. versionadded:: 3.0
- .. versionchanged:: 7.4
+ .. version-added:: 3.0
+ .. version-changed:: 7.4
renamed to `generator_completed` to become a public attribute.
"""
self.treat_page_type: Any = pywikibot.page.BasePage
"""Instance variable to hold the default page type used by :meth:`run`.
- .. versionadded:: 6.1
+ .. version-added:: 6.1
"""
@property
@@ -1375,9 +1375,9 @@
.. note:: Do not overwrite it by subclasses; :meth:`teardown`
should be used instead.
- .. versionchanged:: 7.3
+ .. version-changed:: 7.3
Statistics are printed for all entries in :attr:`counter`
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
Print execution time with days, hours, minutes and seconds.
"""
self.teardown()
@@ -1440,9 +1440,9 @@
def skip_page(self, page: pywikibot.page.BasePage) -> bool:
"""Return whether treat should be skipped for the page.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
use :attr:`use_redirects` to handle redirects,
use :attr:`use_disambigs` to handle disambigs
@@ -1484,13 +1484,13 @@
Invoked by :meth:`run` before running through :attr:`generator`
loop.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
def teardown(self) -> None:
"""Some cleanups after :meth:`run` operation. Invoked by :meth:`exit`.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
def run(self) -> None:
@@ -1536,16 +1536,16 @@
finally:
self.exit()
- .. versionchanged:: 3.0
+ .. version-changed:: 3.0
``skip`` counter was added.; call :meth:`setup` first.
- .. versionchanged:: 6.0
+ .. version-changed:: 6.0
upcast :attr:`generator` to a ``Generator`` type to enable
``generator.close()`` method.
- .. versionchanged:: 6.1
+ .. version-changed:: 6.1
Objects from :attr:`generator` may be different from
:class:`pywikibot.Page` but the type must be registered in
:attr:`treat_page_type`.
- .. versionchanged:: 9.2
+ .. version-changed:: 9.2
leave method gracefully if :attr:`generator` is None using
:func:`suggest_help` function.
@@ -1761,7 +1761,7 @@
The bot should accommodate for that case and not store site specific
information on only one site.
- .. versionchanged:: 6.2
+ .. version-changed:: 6.2
Site attribute has been dropped.
"""
@@ -1788,7 +1788,7 @@
2. `script.ini options` settings
3. command line arguments
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
INI = 'scripts.ini'
@@ -1918,7 +1918,7 @@
For parameters see :meth:`CurrentPageBot.put_current`
- .. versionchanged:: 10.6
+ .. version-changed:: 10.6
return whether the page was saved successfully
"""
if not kwargs.get('summary'):
diff --git a/pywikibot/bot_choice.py b/pywikibot/bot_choice.py
index 8252e09..c3a0b6a 100644
--- a/pywikibot/bot_choice.py
+++ b/pywikibot/bot_choice.py
@@ -115,7 +115,7 @@
def result(self, value: str) -> Any:
"""Return the actual value which is associated by the given one.
- .. versionadded:: 6.2
+ .. version-added:: 6.2
*result()* is an abstract method and must be defined in
subclasses
"""
@@ -156,7 +156,7 @@
<userinterfaces._interface_base.ABUIC.input_choice>`
instead of deprecated :meth:`output`.
- .. versionadded:: 6.2
+ .. version-added:: 6.2
"""
return ''
@@ -508,7 +508,7 @@
"""An option to show a list and select an item.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
before_question = True
@@ -548,7 +548,7 @@
"""An option to select multiple items from a list.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
def test(self, value: str) -> bool:
@@ -579,7 +579,7 @@
"""An option to show a list and select multiple items.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
diff --git a/pywikibot/comms/eventstreams.py b/pywikibot/comms/eventstreams.py
index 757a90c..38d08f7 100644
--- a/pywikibot/comms/eventstreams.py
+++ b/pywikibot/comms/eventstreams.py
@@ -11,8 +11,8 @@
pip install "requests-sse>=0.5.0"
-.. versionadded:: 3.0
-.. versionchanged:: 10.0
+.. version-added:: 3.0
+.. version-changed:: 10.0
``requests-sse`` package is required instead of ``sseclient``.
"""
from __future__ import annotations
@@ -111,9 +111,9 @@
'wiki': 'wikidatawiki'}
>>> del stream
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
subclassed from :class:`tools.collections.GeneratorWrapper`.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
*retry* value is doubled for each consecutive connect try.
"""
@@ -136,7 +136,7 @@
by including a 'retry' line in a message. Retries are handled
automatically.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
5 seconds are used instead of 3 seconds as default.
:keyword pywikibot.Timestamp | str since: a timestamp for older
@@ -169,7 +169,7 @@
:keyword int chunk_size: [*requests*] A maximum size of the chunk
for chunk-encoded requests.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
None is used instead of 1024 as default value.
:param kwargs: Other keyword arguments passed to `requests_sse`
@@ -374,7 +374,7 @@
def generator(self):
"""Inner generator.
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
changed from iterator method to generator property
"""
n = 0
diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py
index 20ba500..d844b4d 100644
--- a/pywikibot/comms/http.py
+++ b/pywikibot/comms/http.py
@@ -26,7 +26,7 @@
session.cookies = http.cookie_jar
-.. versionchanged:: 8.0
+.. version-changed:: 8.0
Cookies are lazy loaded when logging to site.
"""
from __future__ import annotations
@@ -68,8 +68,8 @@
"""CookieJar which create the filename and checks file permissions.
- .. versionadded:: 8.0
- .. versionchanged:: 10.2
+ .. version-added:: 8.0
+ .. version-changed:: 10.2
use `threading.Lock` in :meth:`load` and :meth`save` to be thread
safe.
"""
@@ -120,7 +120,7 @@
def flush() -> None: # pragma: no cover
"""Close the session object. This is called when the module terminates.
- .. versionchanged:: 8.1
+ .. version-changed:: 8.1
log the traceback and show the exception value in the critical
message
"""
@@ -202,7 +202,7 @@
- encodes the username as 'utf-8' and if the username is not ASCII
- URL encodes the username if it is not ASCII, or contains '%'
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
If *username* is not given, get it from environment variables
'PYWIKIBOT_USERNAME' usually used by tests or 'PWB_USERNAME' used
on toolforge.
@@ -231,7 +231,7 @@
format_string: str | None = '') -> str:
"""Generate the user agent string for a given site and format.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
The ``code``, ``lang`` and ``family`` variables in the format
string are deprecated and replaced by ``site``. The
``script_version`` and ``version`` variables are deprecated and
@@ -304,7 +304,7 @@
The optional uri is a relative uri from site base uri including the
document root '/'.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
a *protocol* parameter can be given which is passed to the
:meth:`family.Family.base_url` method.
@@ -517,7 +517,7 @@
def get_charset_from_content_type(content_type: str) -> str | None:
"""Get charset from the content-type header.
- .. versionadded:: 7.3
+ .. version-added:: 7.3
"""
m = CHARSET_RE.search(content_type)
if not m:
@@ -567,7 +567,7 @@
charset: str | None = None) -> str | None:
"""Detect the response encoding.
- .. versionchanged:: 10.1
+ .. version-changed:: 10.1
retrieve charset from `Accept-Charset` list which may look like
`'ISO-8859-1,utf-8;q=0.7,*;q=0.7'`.
diff --git a/pywikibot/config.py b/pywikibot/config.py
index 6bdfc5f..6f221bc 100644
--- a/pywikibot/config.py
+++ b/pywikibot/config.py
@@ -31,9 +31,9 @@
- datafilepath
- shortpath
-.. versionchanged:: 6.2
+.. version-changed:: 6.2
config2 was renamed to config
-.. versionchanged:: 8.0
+.. version-changed:: 8.0
Editor settings has been revised. *editor* variable is None by
default. Editor detection functions were moved to :mod:`editor`.
"""
@@ -281,7 +281,7 @@
def get_user_config_file() -> str:
"""Return user config file name.
- .. versionadded:: 7.7
+ .. version-added:: 7.7
"""
for arg in sys.argv[1:]:
opt, _, value = arg.partition(':')
@@ -313,7 +313,7 @@
Set `PYWIKIBOT_NO_USER_CONFIG=1` to disable loading user config file
(`user-config.py`) or install Pywikibot as a site-package.
- .. versionchanged:: 7.7
+ .. version-changed:: 7.7
Added the *config_file* parameter.
:param test_directory: Assume that a user config file exists in this
@@ -415,7 +415,7 @@
not_exists_ok: bool = False) -> None:
"""Register all family class files contained in a directory.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
The *not_exists_ok* parameter
:param folder_path: The path of a folder containing family files.
diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py
index 6da38eb..ef59ad7 100644
--- a/pywikibot/cosmetic_changes.py
+++ b/pywikibot/cosmetic_changes.py
@@ -179,7 +179,7 @@
order. This dict is used in
:meth:`CosmeticChangesToolkit.standardizePageFooter`.
-.. versionadded:: 9.3
+.. version-added:: 9.3
"""
@@ -190,7 +190,7 @@
If an error occurred and either skips the page or the method
or a single match. ALL raises the exception.
- .. versionadded:: 6.3
+ .. version-added:: 6.3
"""
ALL = 0
@@ -230,7 +230,7 @@
"""Cosmetic changes toolkit.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
`from_page()` method was removed
"""
@@ -239,12 +239,12 @@
ignore: IntEnum = CANCEL.ALL) -> None:
"""Initializer.
- .. versionchanged:: 5.2
+ .. version-changed:: 5.2
instantiate the CosmeticChangesToolkit from a page object;
only allow keyword arguments except for page parameter;
`namespace` and `pageTitle` parameters are deprecated
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
`namespace` and `pageTitle` parameters were removed
:param page: The Page object containing the text to be modified
@@ -349,7 +349,7 @@
2. additional information depending on the local site policy
3. interwiki
- .. versionchanged:: 9.3
+ .. version-changed:: 9.3
uses :attr:`main_sortkey` to determine the sort key for the
main article within a category. If the main article has a
sort key already, it will not be changed any longer.
@@ -415,7 +415,7 @@
def translateAndCapitalizeNamespaces(self, text: str) -> str:
"""Use localized namespace names.
- .. versionchanged:: 7.4
+ .. version-changed:: 7.4
No longer expect a specific namespace alias for File:
"""
# arz uses English stylish codes
@@ -546,7 +546,7 @@
without using a pipe, if possible
* Capitalize the article title of the link, if appropriate
- .. versionchanged:: 8.4
+ .. version-changed:: 8.4
Convert URL-encoded characters if a link is an interwiki link
or different from main namespace.
diff --git a/pywikibot/daemonize.py b/pywikibot/daemonize.py
index ccf591e..012e6cd 100644
--- a/pywikibot/daemonize.py
+++ b/pywikibot/daemonize.py
@@ -89,7 +89,7 @@
Only works on POSIX compatible operating systems. The process will
fork to the background and return control to terminal.
- .. versionchanged:: 10.6
+ .. version-changed:: 10.6
raises NotImplementedError instead of AttributeError if daemonize
is not available for the given platform. Parameters must be given
as keyword-only arguments.
diff --git a/pywikibot/data/__init__.py b/pywikibot/data/__init__.py
index 292ade6..aa58b00 100644
--- a/pywikibot/data/__init__.py
+++ b/pywikibot/data/__init__.py
@@ -13,7 +13,7 @@
"""A mixin to implement wait cycles.
- .. versionadded:: 8.4
+ .. version-added:: 8.4
:ivar int max_retries: Maximum number of times to retry an API
request before quitting. Defaults to ``config.max_retries`` if
diff --git a/pywikibot/data/api/_generators.py b/pywikibot/data/api/_generators.py
index 306fba2..55eafe9 100644
--- a/pywikibot/data/api/_generators.py
+++ b/pywikibot/data/api/_generators.py
@@ -5,7 +5,7 @@
#
"""Objects representing API/Query generators.
-.. versionchanged:: 7.6
+.. version-changed:: 7.6
All Objects were changed from Iterable object to a Generator object.
They are subclassed from :class:`tools.collections.GeneratorWrapper`
"""
@@ -53,9 +53,9 @@
Subclasses can override :meth:`filter_item` for more complex
filtering logic.
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
Renamed from _RequestWrapper.
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
Introduced :attr:`filter_func` and :meth:`filter_item` for
instance-level item filtering.
"""
@@ -69,7 +69,7 @@
Returns the instance-specific filter if set, otherwise the
class-level default (None by default).
- .. versionadded:: 10.4
+ .. version-added:: 10.4
:return: Callable that accepts an item and returns True to
yield, False to skip; or None to disable filtering
@@ -80,7 +80,7 @@
def filter_func(self, func: Callable[[Any], bool] | None):
"""Set a filter function to apply to items before yielding.
- .. versionadded:: 10.4
+ .. version-added:: 10.4
:param func: Callable that accepts an item and returns True to
yield, False to skip; or None to disable filtering
@@ -93,7 +93,7 @@
By default, applies :attr:`filter_func` if set. Returns True if
no filter is set.
- .. versionadded:: 10.4
+ .. version-added:: 10.4
:param item: The item to check
:return: True if the item should be yielded, False otherwise
@@ -120,8 +120,8 @@
def set_maximum_items(self, value: int | str | None) -> None:
"""Set the maximum number of items to be retrieved from the wiki.
- .. versionadded:: 7.1
- .. versionchanged:: 7.6
+ .. version-added:: 7.1
+ .. version-changed:: 7.6
become an abstract method
"""
raise NotImplementedError
@@ -136,7 +136,7 @@
automatically. If the limit attribute is set, the iterator will stop
after iterating that many values.
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
subclassed from :class:`tools.collections.GeneratorWrapper`
"""
@@ -219,9 +219,9 @@
Applies :meth:`filter_item()<APIGeneratorBase.filter_item>` to
each item before yielding.
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
Changed from iterator method to generator property
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
Applies `filter_item` for instance-level filtering.
:yield: Items from the MediaWiki API, filtered by `filter_item()`
@@ -275,7 +275,7 @@
list of pages or links. See the API documentation for specific query
options.
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
subclassed from :class:`tools.collections.GeneratorWrapper`
"""
@@ -481,8 +481,8 @@
def support_namespace(self) -> bool:
"""Check if namespace is a supported parameter on this query.
- .. versionadded:: 3.0.20190430
- .. versionchanged:: 11.1
+ .. version-added:: 3.0.20190430
+ .. version-changed:: 11.1
Return False if module has no prefix instead raising
AttributeError.
@@ -498,11 +498,11 @@
def set_namespace(self, namespaces) -> None:
"""Set a namespace filter on this query.
- .. versionchanged:: 3.0.20190430
+ .. version-changed:: 3.0.20190430
No longer raises TypeError if module does not support a
namespace parameter bug gives a FutureWarning. Return False
in that case.
- .. versionchanged:: 11.1
+ .. version-changed:: 11.1
Again raises TypeError if module does not support a namespace
parameter. Check it with :meth:`support_namespace` first.
No longer raises AttributeError if module has no prefix.
@@ -544,12 +544,12 @@
def continue_update(self) -> None:
"""Update query with continue parameters.
- .. versionadded:: 3.0
- .. versionchanged:: 4.0
+ .. version-added:: 3.0
+ .. version-changed:: 4.0
explicit return a bool value to be used in :meth:`generator`
- .. versionchanged:: 6.0
+ .. version-changed:: 6.0
always return *False*
- .. versionchanged:: 8.4
+ .. version-changed:: 8.4
return *None* instead of *False*.
"""
for key, value in self.data[self.continue_name].items():
@@ -630,7 +630,7 @@
passes :meth:`filter_item() <APIGeneratorBase.filter_item>` and
respects namespaces and the generator's limit.
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
Applies `filter_item()` for instance-level filtering.
:param resultdata: List or iterable of raw API items
@@ -675,9 +675,9 @@
Continues response as needed until limit (if any) is reached.
Each item is already filtered by `_extract_results()`.
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
Changed from iterator method to generator property
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
Items are filtered via :meth:`filter_item()
<APIGeneratorBase.filter_item>` inside :meth:`_extract_results`.
@@ -767,7 +767,7 @@
Required and optional parameters are as for ``Request``, except
that ``action=query`` is assumed and generator is required.
- .. versionchanged:: 9.1
+ .. version-changed:: 9.1
retrieve the same imageinfo properties as in
:meth:`APISite.loadimageinfo()
<pywikibot.site._apisite.APISite.loadimageinfo>` with default
@@ -809,11 +809,11 @@
This can be overridden in subclasses to return a different type
of object.
- .. versionchanged:: 9.5
+ .. version-changed:: 9.5
No longer raise :exc:`exceptions.UnsupportedPageError` but
return a generic :class:`pywikibot.Page` object. The exception
is raised when getting the content for example.
- .. versionchanged:: 9.6
+ .. version-changed:: 9.6
Upcast to :class:`page.FilePage` if *pagedata* has
``imageinfo`` contents even if the file extension is invalid.
"""
@@ -848,7 +848,7 @@
dict for each page queried via a titles= or ids= parameter (which
must be supplied when instantiating this class).
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
Supports instance-level filtering via :attr:`filter_func
<APIGenerator.filter_func>` / :meth:`filter_item()
<APIGenerator.filter_item`.
@@ -877,10 +877,10 @@
def generator(self):
"""Yield results from the API, including previously retrieved dicts.
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
Changed from iterator method to generator property.
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
Items are filtered via :meth:`filter_item()
<APIGenerator.filter_item` inside :meth:`_extract_results`.
Previously retrieved dicts in `_previous_dicts` are also
@@ -911,7 +911,7 @@
def _fully_retrieved_data_dicts(self, resultdata):
"""Yield items of self._previous_dicts that are not in resultdata.
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
Applies :meth:`filter_item()<APIGenerator.filter_item` to
previously stored dicts.
@@ -1060,7 +1060,7 @@
def _update_langlinks(page, langlinks) -> None:
"""Update page langlinks.
- .. versionadded:: 9.3
+ .. version-added:: 9.3
only add a language link if it is found in the family file.
:meta public:
diff --git a/pywikibot/data/api/_optionset.py b/pywikibot/data/api/_optionset.py
index 3583447..2dcb957 100644
--- a/pywikibot/data/api/_optionset.py
+++ b/pywikibot/data/api/_optionset.py
@@ -37,7 +37,7 @@
If a site is given, the module and param must be given too.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
*dict* parameter was renamed to *data*.
:param site: The associated site
diff --git a/pywikibot/data/api/_paraminfo.py b/pywikibot/data/api/_paraminfo.py
index 87851bc..209b884 100644
--- a/pywikibot/data/api/_paraminfo.py
+++ b/pywikibot/data/api/_paraminfo.py
@@ -39,7 +39,7 @@
preloaded_modules: set[str] | None = None) -> None:
"""Initializer.
- .. deprecated:: 8.4
+ .. version-deprecated:: 8.4
the *modules_only_mode* parameter
:param preloaded_modules: API modules to preload
@@ -283,7 +283,7 @@
For duplicate paths, the value will be False.
- .. versionchanged:: 8.4
+ .. version-changed:: 8.4
``normalize_paraminfo`` became a staticmethod.
"""
result_data = {}
diff --git a/pywikibot/data/api/_requests.py b/pywikibot/data/api/_requests.py
index d0c9cd8..129f49e 100644
--- a/pywikibot/data/api/_requests.py
+++ b/pywikibot/data/api/_requests.py
@@ -140,10 +140,10 @@
>>> sorted(data['query'])
['namespaces', 'userinfo']
- .. versionchanged:: 8.4
+ .. version-changed:: 8.4
inherited from :class:`WaitingMixin`.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
*keys* and *items* methods return a view object instead a list
"""
@@ -409,7 +409,7 @@
def iteritems(self):
"""Implement dict interface.
- .. deprecated:: 9.0
+ .. version-deprecated:: 9.0
Use ``items()`` instead.
"""
return iter(self.items())
@@ -701,12 +701,12 @@
unexpected exceptions are logged and trigger a wait before
retrying; they are not propagated to the caller.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
change the scheme if the previous request didn't have json
content.
- .. versionchanged:: 9.2
+ .. version-changed:: 9.2
no wait cycles for :exc:`ImportError` and :exc:`NameError`.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
The scheme swapping introduced in version 8.2 was removed.
Any :class:`Family<family.Family>` file must provide a
correct :meth:`protocol()<family.Family.protocol>` method.
@@ -776,10 +776,10 @@
def _json_loads(self, response) -> dict | None:
"""Return a dict from requests.Response.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
show a warning to add a :meth:`protocol()
<family.Family.protocol>` method to the family file if suitable.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
The warning about missing or wrong ``protocol()`` method
introduced in version 8.2 was removed.
@@ -867,9 +867,9 @@
def _handle_warnings(self, result: dict[str, Any]) -> bool:
"""Handle warnings; return True to retry request, False to resume.
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
Return True to retry the current request and False to resume.
- .. versionchanged:: 10.5
+ .. version-changed:: 10.5
Handle warnings of formatversion 2.
.. seealso:: :api:`Errors and warnings`
@@ -914,7 +914,7 @@
Return True to retry the request, False to resume and None if
the warning is not handled.
- .. versionadded:: 7.2
+ .. version-added:: 7.2
:meta public:
"""
@@ -1033,7 +1033,7 @@
Also reset last API error with wait cycles.
- .. versionadded:: 9.0
+ .. version-added:: 9.0
:param delay: Minimum time in seconds to wait. Overwrites
``retry_wait`` variable if given. The delay doubles each
@@ -1045,10 +1045,10 @@
def submit(self) -> dict:
"""Submit a query and parse the response.
- .. versionchanged:: 8.0.4
+ .. version-changed:: 8.0.4
in addition to *readapidenied* also try to login when API
response is *notloggedin*.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
Raise :exc:`exceptions.APIError` if the same error comes
twice in a row within the loop.
@@ -1227,7 +1227,7 @@
"""Cached request.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
timestamp with timezone is used to determine expiry.
"""
@@ -1258,9 +1258,9 @@
The directory will be created if it does not already exist.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
return a `pathlib.Path` object.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
remove Python main version from directory name
:return: base directory path for cache entries
@@ -1276,10 +1276,10 @@
def _make_dir(dir_name: str | Path) -> Path:
"""Create directory if it does not exist already.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
Only `FileExistsError` is ignored but other OS exceptions can
be still raised
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
use *dir_name* as str or `pathlib.Path` object but always
return a Path object.
@@ -1324,7 +1324,7 @@
def _cachefile_path(self) -> Path:
"""Create the cachefile path.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
return a `pathlib.Path` object.
:meta public:
diff --git a/pywikibot/data/citoid.py b/pywikibot/data/citoid.py
index 96a4326..e8b2fc5 100644
--- a/pywikibot/data/citoid.py
+++ b/pywikibot/data/citoid.py
@@ -1,9 +1,9 @@
"""Citoid Query interface.
-.. versionadded:: 10.6
+.. version-added:: 10.6
"""
#
-# (C) Pywikibot team, 2025
+# (C) Pywikibot team, 2025-2026
#
# Distributed under the terms of the MIT license.
#
diff --git a/pywikibot/data/memento.py b/pywikibot/data/memento.py
index 13600a0..10c5b75 100644
--- a/pywikibot/data/memento.py
+++ b/pywikibot/data/memento.py
@@ -10,8 +10,8 @@
#
"""Fix ups for memento-client package version 0.6.1.
-.. versionadded:: 7.4
-.. versionchanged:: 10.7
+.. version-added:: 7.4
+.. version-changed:: 10.7
Set default timegate to :attr:`DEFAULT_TIMEGATE_BASE_URI`
.. seealso:: https://github.com/mementoweb/py-memento-client#readme
"""
@@ -45,9 +45,9 @@
It makes it straightforward to access the Web of the past as it is
to access the current Web.
- .. versionchanged:: 7.4
+ .. version-changed:: 7.4
`timeout` is used in several methods.
- .. versionchanged:: 10.7
+ .. version-changed:: 10.7
Set default timegate to :attr`DEFAULT_TIMEGATE_BASE_URI`
Basic usage:
@@ -278,7 +278,7 @@
timeout: int | None = None) -> requests.Response:
"""Makes HEAD requests.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
The default timout was increased from 9 to 30 seconds.
:param uri: the uri for the request.
@@ -332,7 +332,7 @@
timeout: int | None = None):
"""Get most recent memento for url.
- .. versionadded:: 10.0
+ .. version-added:: 10.0
The *timeout* parameter.
:param url: The input http url.
diff --git a/pywikibot/data/sparql.py b/pywikibot/data/sparql.py
index d633078..a795358 100644
--- a/pywikibot/data/sparql.py
+++ b/pywikibot/data/sparql.py
@@ -29,7 +29,7 @@
This class allows to run SPARQL queries against any SPARQL endpoint.
- .. versionchanged:: 8.4
+ .. version-changed:: 8.4
inherited from :class:`data.WaitingMixin` which provides a
:meth:`data.WaitingMixin.wait` method.
"""
@@ -130,10 +130,10 @@
def query(self, query: str, headers: dict[str, str] | None = None):
"""Run SPARQL query and return parsed JSON result.
- .. versionchanged:: 8.5
+ .. version-changed:: 8.5
:exc:`exceptions.NoUsernameError` is raised if the response
looks like the user is not logged in.
- .. versionchanged:: 9.6
+ .. version-changed:: 9.6
retry on internal server error (500).
:param query: Query text
diff --git a/pywikibot/data/superset.py b/pywikibot/data/superset.py
index 2308fb6..78a37d9 100644
--- a/pywikibot/data/superset.py
+++ b/pywikibot/data/superset.py
@@ -9,7 +9,7 @@
This module only works with a *client login* (including 2FA).
It does **not** work with BotPassword or OAuth accounts.
-.. versionadded:: 9.2
+.. version-added:: 9.2
"""
from __future__ import annotations
diff --git a/pywikibot/data/wikistats.py b/pywikibot/data/wikistats.py
index bb59a97..2e3b049 100644
--- a/pywikibot/data/wikistats.py
+++ b/pywikibot/data/wikistats.py
@@ -25,7 +25,7 @@
The methods accept a Pywikibot family name as the WikiStats table name,
mapping the names before calling the WikiStats API.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
tables are cached globally instead by instances.
"""
diff --git a/pywikibot/date.py b/pywikibot/date.py
index 3980712..0100328 100644
--- a/pywikibot/date.py
+++ b/pywikibot/date.py
@@ -335,7 +335,7 @@
def intToRomanNum(i: int) -> str:
"""Convert integer to roman numeral.
- .. versionchanged:: 9.5
+ .. version-changed:: 9.5
negative *i* is no longer accepted but 31 is a valid value.
:raises IndexError: Roman value *i* is nont in range 0..31
@@ -348,7 +348,7 @@
def romanNumToInt(v: str) -> int:
"""Convert roman numeral to integer.
- .. versionchanged:: 9.5
+ .. version-changed:: 9.5
``XXXI`` can be converted.
"""
return _romanNumbers.index(v)
@@ -469,7 +469,7 @@
lambda v: dh(v, 'pattern string', encf, decf)
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
*filter* parameter was renamed to *filter_func*
:param encf: Converts from an integer parameter to another integer
diff --git a/pywikibot/diff.py b/pywikibot/diff.py
index 698a8f5..5aaacb8 100644
--- a/pywikibot/diff.py
+++ b/pywikibot/diff.py
@@ -243,7 +243,7 @@
If all hunks are approved, text_b will be obtained.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
*text_a* and *text_b* are positional-only parameters.
*by_letter* and *replace_invisible* are keyword-only parameters.
"""
@@ -655,7 +655,7 @@
>>> get_close_matches_ratio('Pywikibot', p, n=2, cutoff=0, ignorecase=True)
[(0.4444444444444444, 'Wikipedia'), (0.42857142857142855, 'Robot')]
- .. versionadded:: 9.4
+ .. version-added:: 9.4
.. note:: Most code is incorporated from Python software under the
`PSF`_ license.
diff --git a/pywikibot/echo.py b/pywikibot/echo.py
index c39134e..5d4b2fa 100644
--- a/pywikibot/echo.py
+++ b/pywikibot/echo.py
@@ -17,18 +17,18 @@
"""A notification issued by the Echo extension.
- .. versionchanged:: 3.0.20190204
+ .. version-changed:: 3.0.20190204
The ``id`` attribute was renamed to ``event_id``, and its type
changed from ``str`` to ``int``.
- .. deprecated:: 3.0.20190204
+ .. version-deprecated:: 3.0.20190204
The ``id`` attribute was retained temporarily for backward
compatibility, but is deprecated and scheduled for removal.
- .. versionremoved:: 7.0
+ .. version-removed:: 7.0
The ``id`` attribute was removed.
- .. versionchanged:: 10.3
+ .. version-changed:: 10.3
The class is now defined using the ``@dataclass`` decorator to
simplify internal initialization and improve maintainability.
"""
diff --git a/pywikibot/editor.py b/pywikibot/editor.py
index aa17721..9bc694e 100644
--- a/pywikibot/editor.py
+++ b/pywikibot/editor.py
@@ -39,7 +39,7 @@
"""Text editor.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
Editor detection functions were moved from :mod:`config`.
"""
diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py
index be179e8..7c00ac5 100644
--- a/pywikibot/exceptions.py
+++ b/pywikibot/exceptions.py
@@ -164,15 +164,15 @@
- ArgumentDeprecationWarning: command line argument problems
- FamilyMaintenanceWarning: missing information in family definition
-.. versionchanged:: 6.0
+.. version-changed:: 6.0
exceptions were renamed and are ending with "Error".
-.. versionchanged:: 7.0
+.. version-changed:: 7.0
All Pywikibot Error exceptions must be imported from
``pywikibot.exceptions``. Deprecated exceptions identifiers were
removed.
-.. versionchanged:: 8.1
+.. version-changed:: 8.1
``Server414Error`` class is deprecated; use :class:`Client414Error`
instead.
"""
@@ -286,7 +286,7 @@
This class should be used when the Exception concerns a particular
Page, and when a generic message can be written once for all.
- .. versionchanged:: 10.5
+ .. version-changed:: 10.5
A pageid is accepted with the first parameter
"""
@@ -381,7 +381,7 @@
"""Expected rename target user not found.
- .. versionadded:: 9.4
+ .. version-added:: 9.4
"""
message = 'Rename target user of {} not found.'
@@ -412,11 +412,11 @@
"""ItemPage has no sitelink to the given site.
- .. versionadded:: 8.1
- .. deprecated:: 8.1
+ .. version-added:: 8.1
+ .. version-deprecated:: 8.1
This exception depends on :exc:`NoPageError` but it will be
removed.
- .. versionremoved:: 11.0
+ .. version-removed:: 11.0
Dependency on :exc:`NoPageError` was removed.
"""
@@ -507,7 +507,7 @@
"""Missing page history.
- .. versionadded:: 6.2
+ .. version-added:: 6.2
"""
message = 'Page {} is invalid.'
@@ -617,7 +617,7 @@
"""Got unexpected server response due to client issue.
- .. versionadded:: 8.1
+ .. version-added:: 8.1
"""
@@ -625,7 +625,7 @@
"""Server returned with HTTP 414 code.
- .. versionadded:: 8.1
+ .. version-added:: 8.1
"""
diff --git a/pywikibot/families/commons_family.py b/pywikibot/families/commons_family.py
index 527ce55..2906540 100644
--- a/pywikibot/families/commons_family.py
+++ b/pywikibot/families/commons_family.py
@@ -1,6 +1,6 @@
"""Family module for Wikimedia Commons."""
#
-# (C) Pywikibot team, 2005-2025
+# (C) Pywikibot team, 2005-2026
#
# Distributed under the terms of the MIT license.
#
@@ -13,7 +13,7 @@
"""Family class for Wikimedia Commons.
- .. versionchanged:: 6.5
+ .. version-changed:: 6.5
:meth:`family.WikibaseFamily.interface` was changed to
:class:`DataSite<pywikibot.site._datasite.DataSite>` to enable
structured data.
diff --git a/pywikibot/families/foundation_family.py b/pywikibot/families/foundation_family.py
index 3e57da8..79ebe23 100644
--- a/pywikibot/families/foundation_family.py
+++ b/pywikibot/families/foundation_family.py
@@ -1,9 +1,9 @@
"""Family module for Foundation wiki.
-.. versionadded:: 3.0
+.. version-added:: 3.0
"""
#
-# (C) Pywikibot team, 2019-2022
+# (C) Pywikibot team, 2019-2026
#
# Distributed under the terms of the MIT license.
#
@@ -16,7 +16,7 @@
"""Family class for Foundation wiki.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
name = 'foundation'
diff --git a/pywikibot/families/lingualibre_family.py b/pywikibot/families/lingualibre_family.py
index 6b81c93..64d509c 100644
--- a/pywikibot/families/lingualibre_family.py
+++ b/pywikibot/families/lingualibre_family.py
@@ -1,9 +1,9 @@
"""Family module for Lingua Libre.
-.. versionadded:: 6.5
+.. version-added:: 6.5
"""
#
-# (C) Pywikibot team, 2021-2024
+# (C) Pywikibot team, 2021-2026
#
# Distributed under the terms of the MIT license.
#
@@ -16,7 +16,7 @@
"""Family class for Lingua Libre.
- .. versionadded:: 6.5
+ .. version-added:: 6.5
"""
name = 'lingualibre'
diff --git a/pywikibot/families/meta_family.py b/pywikibot/families/meta_family.py
index 6b029c5..9497339 100644
--- a/pywikibot/families/meta_family.py
+++ b/pywikibot/families/meta_family.py
@@ -13,7 +13,7 @@
"""Family class for Meta Wiki.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
beta site code was added.
"""
diff --git a/pywikibot/families/wikifunctions_family.py b/pywikibot/families/wikifunctions_family.py
index b240a1f..eace320 100644
--- a/pywikibot/families/wikifunctions_family.py
+++ b/pywikibot/families/wikifunctions_family.py
@@ -1,9 +1,9 @@
"""Family module for Wikifunction.
-.. versionadded:: 8.4
+.. version-added:: 8.4
"""
#
-# (C) Pywikibot team, 2023
+# (C) Pywikibot team, 2023-2026
#
# Distributed under the terms of the MIT license.
#
diff --git a/pywikibot/families/wikihow_family.py b/pywikibot/families/wikihow_family.py
index 6e4fae8..8fb2f0e 100644
--- a/pywikibot/families/wikihow_family.py
+++ b/pywikibot/families/wikihow_family.py
@@ -1,9 +1,9 @@
"""Family module for wikiHow wiki.
-.. versionadded:: 3.0
+.. version-added:: 3.0
"""
#
-# (C) Pywikibot team, 2020-2024
+# (C) Pywikibot team, 2020-2026
#
# Distributed under the terms of the MIT license.
#
@@ -17,7 +17,7 @@
"""Family class for wikiHow Wiki.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
name = 'wikihow'
@@ -31,7 +31,7 @@
removed_wikis = ['ca', 'cy', 'fa', 'he', 'pl', 'ur']
title_delimiter_and_aliases = '- '
- """.. versionadded:: 7.0"""
+ """.. version-added:: 7.0"""
@classproperty
def domains(cls):
diff --git a/pywikibot/families/wikimania_family.py b/pywikibot/families/wikimania_family.py
index a43a36a..893a354 100644
--- a/pywikibot/families/wikimania_family.py
+++ b/pywikibot/families/wikimania_family.py
@@ -1,9 +1,9 @@
"""Family module for Wikimania wikis.
-.. versionadded:: 3.0
+.. version-added:: 3.0
"""
#
-# (C) Pywikibot team, 2017-2024
+# (C) Pywikibot team, 2017-2026
#
# Distributed under the terms of the MIT license.
#
@@ -18,7 +18,7 @@
"""Family class for Wikimania wikis.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
name = 'wikimania'
diff --git a/pywikibot/families/wikipedia_family.py b/pywikibot/families/wikipedia_family.py
index d06e294..b3e5b6b 100644
--- a/pywikibot/families/wikipedia_family.py
+++ b/pywikibot/families/wikipedia_family.py
@@ -230,7 +230,7 @@
def __post_init__(cls) -> None:
"""Add 'yue' code alias due to :phab:`T341960`.
- .. versionadded:: 8.3
+ .. version-added:: 8.3
"""
aliases = cls.code_aliases.copy()
aliases['yue'] = 'zh-yue'
diff --git a/pywikibot/families/wikispore_family.py b/pywikibot/families/wikispore_family.py
index f07a42b..2dd0e5f 100644
--- a/pywikibot/families/wikispore_family.py
+++ b/pywikibot/families/wikispore_family.py
@@ -1,9 +1,9 @@
"""Family module for Wikispore.
-.. versionadded:: 4.1
+.. version-added:: 4.1
"""
#
-# (C) Pywikibot team, 2020-2023
+# (C) Pywikibot team, 2020-2026
#
# Distributed under the terms of the MIT license.
#
@@ -16,7 +16,7 @@
"""Family class for Wikispore.
- .. versionadded:: 4.1
+ .. version-added:: 4.1
"""
name = 'wikispore'
diff --git a/pywikibot/families/wiktionary_family.py b/pywikibot/families/wiktionary_family.py
index 1f238a0..bcc7ef4 100644
--- a/pywikibot/families/wiktionary_family.py
+++ b/pywikibot/families/wiktionary_family.py
@@ -1,6 +1,6 @@
"""Family module for Wiktionary."""
#
-# (C) Pywikibot team, 2005-2025
+# (C) Pywikibot team, 2005-2026
#
# Distributed under the terms of the MIT license.
#
@@ -14,7 +14,7 @@
"""Family class for Wiktionary.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
``alphabetic_sv`` attribute was removed; ``interwiki_putfirst``
attribute was removed and default setting from parent class is
used.
@@ -96,7 +96,7 @@
def __post_init__(cls) -> None:
"""Add 'zh-yue' code alias due to :phab:`T341960`.
- .. versionadded:: 8.3
+ .. version-added:: 8.3
"""
aliases = cls.code_aliases.copy()
aliases['zh-yue'] = 'yue'
diff --git a/pywikibot/families/wowwiki_family.py b/pywikibot/families/wowwiki_family.py
index bdc5918..5a83226 100644
--- a/pywikibot/families/wowwiki_family.py
+++ b/pywikibot/families/wowwiki_family.py
@@ -1,6 +1,6 @@
"""Family module for WOW wiki."""
#
-# (C) Pywikibot team, 2009-2025
+# (C) Pywikibot team, 2009-2026
#
# Distributed under the terms of the MIT license.
#
@@ -58,7 +58,7 @@
def categories_last(cls):
"""Property listing site keys for categories at last position.
- .. deprecated:: 10.3
+ .. version-deprecated:: 10.3
use :meth:`site.has_extension('CategorySelect')
<pywikibot.site._apisite.APISite.has_extension>` instead
"""
diff --git a/pywikibot/family.py b/pywikibot/family.py
index e58c52c..45022cf 100644
--- a/pywikibot/family.py
+++ b/pywikibot/family.py
@@ -47,17 +47,17 @@
Families are immutable and initializer is unsupported. Any class
modification should go to :meth:`__post_init__` class method.
- .. versionchanged:: 3.0
+ .. version-changed:: 3.0
the family class is immutable. Having an ``__init__`` initializer
method a ``NotImplementedWarning`` will be given.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
``alphabetic``, ``alphabetic_revised`` and ``fyinterwiki``
attributes where removed.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
:attr:`obsolete` setter was removed.
- .. versionchanged:: 8.3
+ .. version-changed:: 8.3
Having an initializer method a ``FutureWarning`` will be given.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
raises RuntimeError if an initializer method was found;
:meth:`__post_init__` classmethod should be used instead.
"""
@@ -316,7 +316,7 @@
.. warning:: This attribute is used within ``re.sub()`` method. Use
escape sequence if necessary
- .. versionadded:: 7.0
+ .. version-added:: 7.0
"""
_families: dict[str, Family] = {}
@@ -326,7 +326,7 @@
def categories_last(cls) -> list[str]:
"""Categories come after interwiki links for the given site codes.
- .. deprecated:: 10.3
+ .. version-deprecated:: 10.3
use :meth:`site.has_extension('CategorySelect')
<pywikibot.site._apisite.APISite.has_extension>` instead
"""
@@ -430,14 +430,14 @@
def get_edit_restricted_templates(self, code):
"""Return tuple of edit restricted templates.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
return self.edit_restricted_templates.get(code, ())
def get_archived_page_templates(self, code):
"""Return tuple of archived page templates.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
return self.archived_page_templates.get(code, ())
@@ -461,7 +461,7 @@
May be overridden to return 'http'. Other protocols are not
supported.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
``https`` is returned instead of ``http``.
:param code: Language code
@@ -472,7 +472,7 @@
def verify_SSL_certificate(self, code: str) -> bool:
"""Return whether a HTTPS certificate should be verified.
- .. versionadded:: 5.3
+ .. version-added:: 5.3
renamed from ignore_certificate_error
:param code: Language code
@@ -550,14 +550,14 @@
def eventstreams_host(self, code) -> NoReturn:
"""Hostname for EventStreams.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
raise NotImplementedError('This family does not support EventStreams')
def eventstreams_path(self, code) -> NoReturn:
"""Return path for EventStreams.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
raise NotImplementedError('This family does not support EventStreams')
@@ -592,10 +592,10 @@
applies and then iterates over :attr:`Family.codes` to actually
determine which code applies.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
*url* parameter does not have to contain a api/query/script
path
- .. versionchanged:: 10.3
+ .. version-changed:: 10.3
accept a trailing slash in *url* after domain.
:param url: The URL which may contain a ``$1``. If it's missing
@@ -698,7 +698,7 @@
def isPublic(self, code) -> bool:
"""Check the wiki require logging in before viewing it.
- .. deprecated:: 10.6
+ .. version-deprecated:: 10.6
"""
return True
@@ -753,9 +753,9 @@
xx: now should get code yy:, add {'xx':'yy'} to
:attr:`code_aliases`.
- .. deprecated:: 10.6
+ .. version-deprecated:: 10.6
Use :attr:`code_aliases` directly instead.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
changed from dict to invariant mapping.
"""
return types.MappingProxyType(cls.code_aliases)
@@ -767,7 +767,7 @@
Codes that should be removed, usually because the site has been
taken down.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
changed from list to invariant frozenset.
"""
return frozenset(cls.removed_wikis + cls.closed_wikis)
@@ -834,7 +834,7 @@
"""Common features of Fandom families.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
renamed from WikiaFamily
"""
@@ -857,7 +857,7 @@
"""Class for all wikimedia families.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
:attr:`knows_codes` attribute was added.
"""
@@ -1023,7 +1023,7 @@
They should be roughly sorted by size.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
Sorting order is retrieved via :mod:`wikistats` for each call.
:raises NotImplementedError: Family is not member of
@@ -1069,7 +1069,7 @@
"""A base class for a Wikibase Family.
- .. versionadded:: 8.2
+ .. version-added:: 8.2
"""
def interface(self, code) -> str:
@@ -1106,7 +1106,7 @@
.. warning:: Possibly you have to adjust the repository site in
:meth:`WikibaseFamily.entity_sources` to get the valid entity.
- .. versionadded:: 8.2
+ .. version-added:: 8.2
"""
@property
diff --git a/pywikibot/fixes.py b/pywikibot/fixes.py
index 1a29c03..4e1c749 100644
--- a/pywikibot/fixes.py
+++ b/pywikibot/fixes.py
@@ -5,7 +5,7 @@
#
"""File containing all standard fixes.
-.. versionremoved:: 11.0
+.. version-removed:: 11.0
The ``yu-tld`` predefined fix was removed.
"""
from __future__ import annotations
diff --git a/pywikibot/i18n.py b/pywikibot/i18n.py
index 3fbe318..0f4c4d9 100644
--- a/pywikibot/i18n.py
+++ b/pywikibot/i18n.py
@@ -416,7 +416,7 @@
For internal use, don't use it directly.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
"""
filename = f'{dirname}/{lang}.json'
try:
@@ -565,11 +565,11 @@
For PLURAL support have a look at the :func:`twtranslate` function.
- .. versionchanged:: 2.0
+ .. version-changed:: 2.0
*parameter* other than a mapping (or None) is deprecated.
- .. versionchanged:: 6.2
+ .. version-changed:: 6.2
ValueError is raised if *parameter* is not a mapping.
- .. versionchanged:: 10.2
+ .. version-changed:: 10.2
TypeError instead of ValueError is raised if *parameter* is not a
mapping.
@@ -662,7 +662,7 @@
.. note:: If *source* is a str and ``config.bot_prefix`` is set to
None, it cannot be determined whether the current user is a bot
account. In this cas the prefix will be returned.
- .. versionadded:: 8.1
+ .. version-added:: 8.1
:param source: When it's a site it's using the lang attribute and otherwise
it is using the value directly.
@@ -746,10 +746,10 @@
... ) % {'descr': 'seulement'})
'Robot: Changer seulement quelques pages.'
- .. versionchanged:: 8.1
+ .. version-changed:: 8.1
the *bot_prefix* parameter was added.
- .. versionchanged:: 10.5
+ .. version-changed:: 10.5
*fallback_prompt* is now returned whenever no translation is found,
including unknown keys in existing packages.
@@ -907,7 +907,7 @@
>>> path.parent.as_posix()
'scripts/i18n'
- .. versionadded:: 7.0
+ .. version-added:: 7.0
:param stem: Yield the Path.stem if True and the Path object otherwise
"""
@@ -945,7 +945,7 @@
langs.add(fname.stem)
return sorted(langs)
- .. versionadded:: 7.0
+ .. version-added:: 7.0
"""
return sorted(
{fname.stem for dirpath in bundles() for fname in dirpath.iterdir()
diff --git a/pywikibot/interwiki_graph.py b/pywikibot/interwiki_graph.py
index e68acbb..3ea950b 100644
--- a/pywikibot/interwiki_graph.py
+++ b/pywikibot/interwiki_graph.py
@@ -43,7 +43,7 @@
def run(self) -> None:
"""Write graphs to the data directory.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
use explicit ``utf-8`` encoding.
"""
for fmt in config.interwiki_graph_formats:
diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py
index 4724f90..143023c 100644
--- a/pywikibot/logentries.py
+++ b/pywikibot/logentries.py
@@ -97,7 +97,7 @@
def params(self) -> dict[str, Any]:
"""Additional data for some log entry types.
- .. versionadded:: 9.4
+ .. version-added:: 9.4
private *_param* attribute became a public property
"""
return self.get('params', {})
@@ -211,7 +211,7 @@
def oldgroups(self) -> list[str]:
"""Return old rights groups.
- .. versionchanged:: 7.5
+ .. version-changed:: 7.5
No longer raise KeyError if `oldgroups` does not exists or
LogEntry has no additional data e.g. due to hidden data and
insufficient rights.
@@ -222,7 +222,7 @@
def newgroups(self) -> list[str]:
"""Return new rights groups.
- .. versionchanged:: 7.5
+ .. version-changed:: 7.5
No longer raise KeyError if `oldgroups` does not exists or
LogEntry has no additional data e.g. due to hidden data and
insufficient rights.
diff --git a/pywikibot/logging.py b/pywikibot/logging.py
index c95a808..8d08cee 100644
--- a/pywikibot/logging.py
+++ b/pywikibot/logging.py
@@ -105,10 +105,10 @@
``exc_info=True``, which causes the log message to include an
exception traceback.
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
Positional arguments for *decoder* and *newline* are deprecated;
keyword arguments should be used.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
*args* parameter can now given as formatting arguments directly
to the logger.
@@ -166,11 +166,11 @@
>>> info('Pywikibot %(version)d', {'version': 10}) # doctest: +SKIP
Pywikibot 10
- .. versionadded:: 7.2
+ .. version-added:: 7.2
was renamed from :func:`output`. Positional arguments for
*decoder* and *newline* are deprecated; keyword arguments should
be used. Keyword parameter *layer* was added.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
*args* parameter can now given as formatting arguments directly
to the logger.
@@ -184,7 +184,7 @@
"""Synonym for :func:`info` for backward compatibility. The arguments are
interpreted as for :func:`logoutput`.
-.. versionchanged:: 7.2
+.. version-changed:: 7.2
was renamed to :func:`info`; `text` was renamed to `msg`; `msg`
paramerer may be omitted; only keyword arguments are allowed except
for `msg`. Keyword parameter *layer* was added.
@@ -203,11 +203,11 @@
The arguments are interpreted as for :func:`logoutput`.
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
`text` was renamed to `msg`; `msg` parameter may be omitted;
only keyword arguments are allowed except for `msg`. Keyword
parameter *layer* was added.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
*args* parameter can now given as formatting arguments directly
to the logger.
.. seealso::
@@ -223,10 +223,10 @@
``msg`` will be sent to stderr via :mod:`pywikibot.userinterfaces`.
The arguments are interpreted as for :func:`logoutput`.
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
`text` was renamed to `msg`; only keyword arguments are allowed
except for `msg`. Keyword parameter *layer* was added.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
*args* parameter can now given as formatting arguments directly
to the logger.
.. seealso::
@@ -241,10 +241,10 @@
``msg`` will be sent to stderr via :mod:`pywikibot.userinterfaces`.
The arguments are interpreted as for :func:`logoutput`.
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
`text` was renamed to `msg`; only keyword arguments are allowed
except for `msg`. Keyword parameter *layer* was added.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
*args* parameter can now given as formatting arguments directly
to the logger.
.. seealso::
@@ -258,10 +258,10 @@
The arguments are interpreted as for :func:`logoutput`.
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
`text` was renamed to `msg`; only keyword arguments are allowed
except for `msg`. Keyword parameter *layer* was added.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
*args* parameter can now given as formatting arguments directly
to the logger.
.. seealso::
@@ -276,10 +276,10 @@
``msg`` will be sent to stderr via :mod:`pywikibot.userinterfaces`.
The arguments are interpreted as for :func:`logoutput`.
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
`text` was renamed to `msg`; only keyword arguments are allowed
except for `msg`. Keyword parameter *layer* was added.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
*args* parameter can now given as formatting arguments directly
to the logger.
.. seealso::
@@ -294,10 +294,10 @@
The arguments are interpreted as for :func:`logoutput`.
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
`layer` parameter is optional; `text` was renamed to `msg`;
only keyword arguments are allowed except for `msg`.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
*args* parameter can now given as formatting arguments directly
to the logger.
.. seealso::
@@ -330,13 +330,13 @@
``msg`` will be sent to stderr via :mod:`pywikibot.userinterfaces`.
The arguments are interpreted as for :func:`logoutput`.
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
only keyword arguments are allowed except for `msg`;
`exc_info` keyword is to be used instead of `tb`. Keyword
parameter *layer* was added.
- .. versionchanged:: 7.3
+ .. version-changed:: 7.3
`exc_info` is True by default
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
*args* parameter can now given as formatting arguments directly
to the logger.
.. seealso::
diff --git a/pywikibot/login.py b/pywikibot/login.py
index 475f143..5a856cd 100644
--- a/pywikibot/login.py
+++ b/pywikibot/login.py
@@ -122,7 +122,7 @@
def __repr__(self) -> str:
"""Return representation string for LoginManager.
- .. versionadded:: 10.0
+ .. version-added:: 10.0
"""
return f'{type(self).__name__}(user={self.username!r})'
@@ -216,10 +216,10 @@
('en', 'wikipedia', 'my_en_wikipedia_user', 'my_en_wikipedia_pass')
('my_username', BotPassword('my_suffix', 'my_password'))
- .. versionchanged:: 10.2
+ .. version-changed:: 10.2
Raises ValueError instead of AttributeError if password_file
is not set.
- .. versionchanged:: 10.7.1
+ .. version-changed:: 10.7.1
Due to vulnerability issue the password lines are no longer
evaluated as Python source but parsed as literals.
Raises ValueError if an exception occurs while evaluating a
@@ -361,10 +361,10 @@
"""Supply login_to_site method to use API interface.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
2FA login was enabled. LoginManager was moved from :mod:`data.api`
to :mod:`login` module and renamed to *ClientLoginManager*.
- .. versionchanged:: 10.2
+ .. version-changed:: 10.2
Secondary authentication via email was enabled.
.. seealso::
- https://www.mediawiki.org/wiki/Extension:OATHAuth
@@ -420,9 +420,9 @@
Note, this doesn't do anything with cookies. The http module
takes care of all the cookie stuff. Throws exception on failure.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
2FA login was implemented.
- .. versionchanged:: 10.2
+ .. version-changed:: 10.2
Secondary authentication via email was implemented.
:raises RuntimeError: Unexpected API login response key or
@@ -657,7 +657,7 @@
Implemented to discard user interaction token fetching,
usually for tests.
- .. versionadded:: 10.0
+ .. version-added:: 10.0
"""
return self._access_token
@@ -670,7 +670,7 @@
def identity(self) -> dict[str, Any] | None:
"""Get identifying information about a user via an authorized token.
- .. versionchanged:: 9.6
+ .. version-changed:: 9.6
*leeway* parameter for ``mwoauth.identify`` function was
increased to 30.0 seconds.
"""
diff --git a/pywikibot/page/_basepage.py b/pywikibot/page/_basepage.py
index 2c0ab8f..f5ad6ff 100644
--- a/pywikibot/page/_basepage.py
+++ b/pywikibot/page/_basepage.py
@@ -363,7 +363,7 @@
...
pywikibot.exceptions.IsRedirectPageError: ... is a redirect page.
- .. versionchanged:: 9.2
+ .. version-changed:: 9.2
:exc:`exceptions.SectionError` is raised if the
:meth:`section` does not exists
.. seealso:: :attr:`text` property
@@ -403,7 +403,7 @@
Not existing pages are considered loaded.
- .. versionadded:: 7.6
+ .. version-added:: 7.6
"""
return not self.exists() or self._latest_cached_revision() is not None
@@ -443,7 +443,7 @@
) -> pywikibot.page.Revision:
"""Return an old revision of this page.
- .. versionadded:: 9.6
+ .. version-added:: 9.6
.. seealso:: :meth:`getOldVersion`
@@ -459,7 +459,7 @@
def getOldVersion(self, oldid, force: bool = False) -> str:
"""Return text of an old revision of this page.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
The unused parameter *get_redirect* was removed.
.. seealso:: :meth:`get_revision`
@@ -624,7 +624,7 @@
def get_parsed_page(self, force: bool = False) -> str:
"""Retrieve parsed text (via action=parse) and cache it.
- .. versionchanged:: 7.1
+ .. version-changed:: 7.1
`force` parameter was added;
`_get_parsed_page` becomes a public method
@@ -645,7 +645,7 @@
intro: bool = True) -> str:
"""Retrieve an extract of this page.
- .. versionadded:: 7.1
+ .. version-added:: 7.1
.. seealso:: :meth:`APISite.extract()
<pywikibot.site._extensions.TextExtractsMixin.extract>`.
@@ -746,7 +746,7 @@
def userName(self) -> str:
"""Return name or IP address of last user to edit page.
- .. deprecated:: 9.3
+ .. version-deprecated:: 9.3
Use :attr:`latest_revision.user<latest_revision>`
instead.
"""
@@ -756,7 +756,7 @@
def isIpEdit(self) -> bool:
"""Return True if last editor was unregistered.
- .. deprecated:: 9.3
+ .. version-deprecated:: 9.3
Use :attr:`latest_revision.anon<latest_revision>`
instead.
"""
@@ -817,7 +817,7 @@
A static redirect must be a valid redirect, and contain the magic
word __STATICREDIRECT__.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
__STATICREDIRECT__ can be transcluded
:param force: Bypass local caching
@@ -1065,7 +1065,7 @@
) -> Iterable[pywikibot.Page]:
"""Return an iterable of redirects to this page.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
:param filter_fragments: If True, only return redirects with
fragments. If False, only return redirects without fragments.
@@ -1278,15 +1278,15 @@
**kwargs) -> None:
"""Save the current contents of page's text to the wiki.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
boolean *watch* parameter is deprecated
- .. versionchanged:: 9.3
+ .. version-changed:: 9.3
*botflag* parameter was renamed to *bot*.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
edits cannot be marked as bot edits if the bot account has no
``bot`` right. Therefore a ``None`` argument for *bot*
parameter was dropped.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
boolean *watch* parameter is desupported
.. hint:: Setting up :manpage:`OAuth` or :manpage:`BotPassword
@@ -1426,11 +1426,11 @@
For new code, using :meth:`save` is preferred; also ee that
method docs for all parameters not listed here.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
The `show_diff` parameter
- .. versionchanged:: 9.3
+ .. version-changed:: 9.3
*botflag* parameter was renamed to *bot*.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
edits cannot be marked as bot edits if the bot account has no
``bot`` right. Therefore a ``None`` argument for *bot*
parameter was dropped.
@@ -1457,7 +1457,7 @@
) -> bool:
"""Add or remove this page from the bot account's watchlist.
- .. versionchanged:: 10.4.0
+ .. version-changed:: 10.4.0
Added the *expiry* parameter to specify watch expiry time.
Positional parameters are deprecated; all parameters must be
passed as keyword arguments.
@@ -1520,7 +1520,7 @@
.. note:: This discards content saved to self.text.
- .. versionchanged:: 9.2
+ .. version-changed:: 9.2
*botflag* parameter was renamed to *bot*.
"""
if not self.exists():
@@ -1546,9 +1546,9 @@
For the parameters refer
:py:mod:`APISite.pagelinks<pywikibot.site.APISite.pagelinks>`
- .. versionadded:: 7.0
+ .. version-added:: 7.0
the `follow_redirects` keyword argument.
- .. versionremoved:: 10.0
+ .. version-removed:: 10.0
the positional arguments.
.. seealso::
@@ -1659,12 +1659,12 @@
method caches the result. If *namespaces* is used, all pages are
retrieved and cached but the result is filtered.
- .. versionchanged:: 2.0
+ .. version-changed:: 2.0
a list of :class:`pywikibot.Page` is returned instead of a
list of template titles. The given pages may have namespaces
different from TEMPLATE namespace. *get_redirect* parameter
was removed.
- .. versionchanged:: 9.2
+ .. version-changed:: 9.2
*namespaces* parameter was added; all parameters must be given
as keyword arguments.
@@ -1707,8 +1707,8 @@
but they can be yielded from the cache of a previous
:meth:`templates` call.
- .. versionadded:: 2.0
- .. versionchanged:: 9.2
+ .. version-added:: 2.0
+ .. version-changed:: 9.2
*namespaces* parameter was added; all parameters except
*total* must be given as keyword arguments.
@@ -1752,10 +1752,10 @@
) -> Iterable[pywikibot.Page]:
"""Iterate categories that the article is in.
- .. versionchanged:: 2.0
+ .. version-changed:: 2.0
*with_sort_key* parameter is not supported and a
NotImplementedError is raised if set.
- .. versionchanged:: 9.6
+ .. version-changed:: 9.6
*with_sort_key* parameter is supported.
.. seealso:: :meth:`Site.pagecategories()
<pywikibot.site._generators.GeneratorsMixin.pagecategories>`
@@ -1828,7 +1828,7 @@
ignore_section: bool = True) -> pywikibot.Page:
"""Return a Page object for the target this Page redirects to.
- .. versionadded:: 9.3
+ .. version-added:: 9.3
*ignore_section* parameter
.. seealso::
@@ -1973,7 +1973,7 @@
movesubpages: bool = True) -> pywikibot.page.Page:
"""Move this page to a new title.
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
The *movesubpages* parameter was added
:param newtitle: The new page title.
@@ -1994,7 +1994,7 @@
def rollback(self, **kwargs: Any) -> dict[str, int | str]:
"""Roll back this page to the version before the last edit by a user.
- .. versionadded:: 10.5
+ .. version-added:: 10.5
.. seealso::
:meth:`Site.rollbackpage()
@@ -2046,7 +2046,7 @@
) -> int:
"""Delete the page from the wiki. Requires administrator status.
- .. versionchanged:: 7.1
+ .. version-changed:: 7.1
keyword only parameter *deletetalk* was added.
:param reason: The edit summary for the deletion, or rationale
@@ -2116,7 +2116,7 @@
def has_deleted_revisions(self) -> bool:
"""Return True if the page has deleted revisions.
- .. versionadded:: 4.2
+ .. version-added:: 4.2
"""
if not hasattr(self, '_has_deleted_revisions'):
gen = self.site.deletedrevs(self, total=1, prop=['ids'])
@@ -2303,7 +2303,7 @@
show_diff: bool = False) -> bool:
"""Remove page from oldCat and add it to newCat.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
The `show_diff` parameter
:param old_cat: Category to be removed
diff --git a/pywikibot/page/_category.py b/pywikibot/page/_category.py
index 1a3224a..786b8d9 100644
--- a/pywikibot/page/_category.py
+++ b/pywikibot/page/_category.py
@@ -105,7 +105,7 @@
`sys.getrecursionlimit()`, an ``RecursionError`` may be
raised. Be careful if passing this generator to a collection
in such case.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
all parameters are keyword arguments only. Additional
parameters are supported. The order of subcategories are
yielded was changed. The old order was
@@ -162,7 +162,7 @@
`sys.getrecursionlimit()`, an ``RecursionError`` may be
raised. Be careful if passing this generator to a collection
in such case.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
all parameters are keyword arguments only.
:param recurse: If not False or 0, also iterate articles in
@@ -227,7 +227,7 @@
`sys.getrecursionlimit()`, an ``RecursionError`` may be
raised. Be careful if passing this generator to a collection
in such case.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
all parameters are keyword arguments only. Additional
parameters are supported.
diff --git a/pywikibot/page/_collections.py b/pywikibot/page/_collections.py
index dd0a26b..218198b 100644
--- a/pywikibot/page/_collections.py
+++ b/pywikibot/page/_collections.py
@@ -149,7 +149,7 @@
def normalizeData(cls, data: dict) -> dict:
"""Helper function to expand data into the Wikibase API structure.
- .. versionchanged:: 7.7
+ .. version-changed:: 7.7
raises TypeError if *data* value is not a list.
:param data: Data to normalize
diff --git a/pywikibot/page/_filepage.py b/pywikibot/page/_filepage.py
index 318cebf..c9738a5 100644
--- a/pywikibot/page/_filepage.py
+++ b/pywikibot/page/_filepage.py
@@ -42,11 +42,11 @@
ignore_extension: bool = False) -> None:
"""Initializer.
- .. versionchanged:: 8.4
+ .. version-changed:: 8.4
Check for valid extensions.
- .. versionchanged:: 9.3
+ .. version-changed:: 9.3
Added the optional *ignore_extension* parameter.
- .. versionchanged:: 9.6
+ .. version-changed:: 9.6
Show a warning if *ignore_extension* was set and the
extension is invalid.
.. seealso::
@@ -133,7 +133,7 @@
This function will load also metadata. It is also used as a
helper in FileInfo to load metadata lazily.
- .. versionadded:: 8.6
+ .. version-added:: 8.6
:param ts: Timestamp of the Image revision to retrieve
:return: Instance of FileInfo()
@@ -212,7 +212,7 @@
def file_is_shared(self) -> bool:
"""Check if the file is stored on any known shared repository.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
return False if file does not exist on shared image repository
instead raising NoPageError.
"""
@@ -265,11 +265,11 @@
'Pywikibot'
.. seealso:: :meth:`globalusage`
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
all parameters from :meth:`APISite.imageusage()
<pywikibot.site._generators.GeneratorsMixin.imageusage>`
are available.
- .. versionchanged:: 7.4
+ .. version-changed:: 7.4
renamed from :meth:`usingPages`.
"""
return self.site.imageusage(self, **kwargs)
@@ -278,7 +278,7 @@
def file_is_used(self) -> bool:
"""Check whether the file is used at this site.
- .. versionadded:: 7.1
+ .. version-added:: 7.1
"""
return bool(list(self.using_pages(total=1)))
@@ -360,9 +360,9 @@
The suffix has changed and Pywikibot_MW_gear_icon.png was
downloaded.
- .. versionadded:: 8.2
+ .. version-added:: 8.2
*url_width*, *url_height* and *url_param* parameters.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
*filename* argument may be also a path-like object or an
iterable of path segments.
.. note:: filename suffix is adjusted if target url's suffix is
@@ -450,7 +450,7 @@
the method returns the associated mediainfo entity. Otherwise,
it falls back to the behavior of :meth:`BasePage.data_item`.
- .. versionadded:: 6.5
+ .. version-added:: 6.5
:rtype: pywikibot.page.WikibaseEntity
"""
@@ -479,10 +479,10 @@
.. note:: timestamp will be casted to :func:`pywikibot.Timestamp`.
- .. versionchanged:: 7.7
+ .. version-changed:: 7.7
raises KeyError instead of AttributeError if FileInfo is used as
Mapping.
- .. versionchanged:: 8.6
+ .. version-changed:: 8.6
Metadata are loaded lazily.
Added *filepage* parameter.
"""
@@ -496,7 +496,7 @@
def update(self, file_revision) -> None:
"""Update FileInfo with new values.
- .. versionadded:: 8.6
+ .. version-added:: 8.6
"""
for k, v in file_revision.items():
if k == 'timestamp':
@@ -523,7 +523,7 @@
def metadata(self):
"""Return metadata.
- .. versionadded:: 8.6
+ .. version-added:: 8.6
"""
if self._metadata is None:
self.filepage.get_file_info(self.timestamp)
@@ -533,6 +533,6 @@
def metadata(self, value) -> None:
"""Set metadata.
- .. versionadded:: 8.6
+ .. version-added:: 8.6
"""
self._metadata = value
diff --git a/pywikibot/page/_links.py b/pywikibot/page/_links.py
index 8e52f4c..5804693 100644
--- a/pywikibot/page/_links.py
+++ b/pywikibot/page/_links.py
@@ -651,7 +651,7 @@
- badges: Any badges associated with the sitelink
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
# Components used for __repr__
diff --git a/pywikibot/page/_page.py b/pywikibot/page/_page.py
index aaf6c36..ea213bc 100644
--- a/pywikibot/page/_page.py
+++ b/pywikibot/page/_page.py
@@ -133,7 +133,7 @@
) -> None:
"""Change the page's text to point to the redirect page.
- .. versionchanged:: 9.3
+ .. version-changed:: 9.3
*botflag* keyword parameter was renamed to *bot*.
:param target_page: Target of the redirect, this argument is
@@ -188,7 +188,7 @@
Return the first 'preferred' ranked Claim specified by Wikibase
property or the first 'normal' one otherwise.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
.. seealso:: :meth:`pywikibot.ItemPage.get_best_claim`
diff --git a/pywikibot/page/_toolforge.py b/pywikibot/page/_toolforge.py
index 0873cd3..da48437 100644
--- a/pywikibot/page/_toolforge.py
+++ b/pywikibot/page/_toolforge.py
@@ -5,7 +5,7 @@
#
"""Object representing interface to toolforge tools.
-.. versionadded:: 7.7
+.. version-added:: 7.7
"""
from __future__ import annotations
@@ -26,7 +26,7 @@
"""Page mixin for main authorship.
- .. versionadded:: 7.7
+ .. version-added:: 7.7
"""
#: Supported wikipedia site codes
@@ -63,7 +63,7 @@
>>> auth.most_common(1)
[('DrTrigon', 37)]
- .. deprecated:: 9.3
+ .. version-deprecated:: 9.3
use :meth:`authorship` instead.
.. seealso:: :meth:`authorship` for further informations
@@ -103,10 +103,10 @@
.. important:: Only implemented for pages in Main, Project,
Category and Template namespaces and only wikipedias of
:attr:`WIKIBLAME_CODES` are supported.
- .. versionadded:: 9.3
+ .. version-added:: 9.3
XTools is used to retrieve authors. This method replaces
:meth:`main_authors`.
- .. versionchanged:: 10.1
+ .. version-changed:: 10.1
WikiHistory is used to retrieve authors due to :phab:`T392694`.
Here are the differences between these two implementations:
@@ -115,7 +115,7 @@
.. tab:: WikiHistory
- .. versionadded:: 10.1
+ .. version-added:: 10.1
- Implemented from version 7.7 until 9.2 (with
:meth:`main_authors` method) and from 10.1.
@@ -135,7 +135,7 @@
.. tab:: XTools
- .. versionremoved:: 10.1
+ .. version-removed:: 10.1
- Implemented from version 9.3 until 10.0.
- Only Main namespace is supported.
@@ -221,7 +221,7 @@
This implementation uses an optimized subdirectory structure for pickle
caching to avoid filesystem performance issues with millions of files.
- .. versionadded:: 11.0
+ .. version-added:: 11.0
"""
#: Supported WikiWho API language codes
@@ -233,7 +233,7 @@
def _check_wikiwho_supported(self) -> None:
"""Check if WikiWho API is supported.
- .. versionadded:: 11.0
+ .. version-added:: 11.0
:raise NotImplementedError: unsupported site, language, or namespace
:raise NoPageError: page does not exist
@@ -256,7 +256,7 @@
def _build_wikiwho_url(self, endpoint: str) -> str:
"""Build WikiWho API URL for the given endpoint.
- .. versionadded:: 11.0
+ .. version-added:: 11.0
:param endpoint: API endpoint (all_content, rev_content,
edit_persistence)
@@ -288,7 +288,7 @@
.. important:: Only implemented for main namespace pages and only
Wikipedias of :attr:`WIKIWHO_CODES` are supported.
- .. versionadded:: 11.0
+ .. version-added:: 11.0
.. seealso::
- https://wikiwho-api.wmcloud.org
- https://www.mediawiki.org/wiki/WikiWho
@@ -359,7 +359,7 @@
This reduces files per directory from ~7M to ~7K for large wikis.
- .. versionadded:: 11.0
+ .. version-added:: 11.0
:param lang: Language code (e.g., 'en', 'de', 'fi')
:param page_id: Wikipedia page ID
diff --git a/pywikibot/page/_user.py b/pywikibot/page/_user.py
index f9f28d5..2661a9e 100644
--- a/pywikibot/page/_user.py
+++ b/pywikibot/page/_user.py
@@ -95,7 +95,7 @@
def is_CIDR(self) -> bool: # noqa: N802
"""Determine if the input refers to a range of IP addresses.
- .. versionadded:: 9.0
+ .. version-added:: 9.0
.. seealso::
- :meth:`isRegistered`
- :meth:`isAnonymous`
@@ -106,7 +106,7 @@
def getprops(self, force: bool = False) -> dict[str, Any]:
"""Return a properties about the user.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
detect range blocks
:param force: If True, forces reloading the data from API
@@ -154,9 +154,9 @@
- :meth:`is_partial_blocked`
- :meth:`get_block_info`
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
renamed from :meth:`isBlocked` method
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
can also detect range blocks.
:param force: If True, forces reloading the data from API
@@ -171,7 +171,7 @@
- :meth:`APISite.is_partial_blocked()
<pywikibot.site._apisite.APISite.is_partial_blocked>`
- .. versionadded:: 11.0
+ .. version-added:: 11.0
:param force: If True, forces reloading the data from API
"""
@@ -193,7 +193,7 @@
- :meth:`getprops`
- :meth:`is_partial_blocked`
- .. versionadded:: 11.0
+ .. version-added:: 11.0
:param force: If True, forces reloading the data from API
"""
@@ -206,7 +206,7 @@
def is_locked(self, force: bool = False) -> bool:
"""Determine whether the user is currently locked globally.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
:param force: If True, forces reloading the data from API
"""
@@ -371,7 +371,7 @@
This includes the last log event, last edit, last deleted
contribution, and last abuse log entry.
- .. versionadded:: 11.0
+ .. version-added:: 11.0
:return: Timestamp of last user activity
"""
@@ -481,7 +481,7 @@
) -> Generator[tuple[Page, Revision]]:
"""Yield tuples describing this user's deleted edits.
- .. versionadded:: 5.5
+ .. version-added:: 5.5
:param total: Limit results to this number of pages
:keyword start: Iterate contributions starting at this Timestamp
@@ -549,7 +549,7 @@
* :meth:`BasePage.moved_target`
* :meth:`BasePage.getRedirectTarget`
- .. versionadded:: 9.4
+ .. version-added:: 9.4
:raises NoRenameTargetError: User was not renamed
"""
diff --git a/pywikibot/page/_wikibase.py b/pywikibot/page/_wikibase.py
index 900f0ed..cb6b807 100644
--- a/pywikibot/page/_wikibase.py
+++ b/pywikibot/page/_wikibase.py
@@ -294,7 +294,7 @@
.. seealso:: :meth:`WikibasePage.editEntity`
- .. versionchanged:: 8.0.1
+ .. version-changed:: 8.0.1
Copy snak IDs/hashes (:phab:`T327607`)
:param data: Data to be saved
@@ -367,7 +367,7 @@
"""Interface for MediaInfo entities on Commons.
- .. versionadded:: 6.5
+ .. version-added:: 6.5
"""
entity_type = 'mediainfo'
@@ -402,7 +402,7 @@
def _defined_by(self, singular: bool = False) -> dict:
"""Function to provide the API parameters to identify the entity.
- .. versionadded:: 8.5
+ .. version-added:: 8.5
:param singular: Whether the parameter names should use the singular
form
@@ -447,7 +447,7 @@
of this entity and their modifying may indirectly cause
unwanted change to the live content
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
Added *pageid*, *ns*, *title*, *lastrevid*, *modified*, *id*
values to ``_content`` attribute when it is loaded.
@@ -516,7 +516,7 @@
def title(self) -> str:
"""Return ID as title of the MediaInfo.
- .. versionadded:: 9.4
+ .. version-added:: 9.4
.. seealso:: :meth:`getID`
:raises NoWikibaseEntityError: If this entity is associated with
@@ -539,7 +539,7 @@
>>> item = page.data_item()
>>> item.editLabels({'en': 'Test file.'}) # doctest: +SKIP
- .. versionadded:: 8.5
+ .. version-added:: 8.5
"""
data = {'labels': labels}
self.editEntity(data, **kwargs)
@@ -547,7 +547,7 @@
def addClaim(self, claim, bot: bool = True, **kwargs) -> None:
"""Add a claim to the MediaInfo.
- .. versionadded:: 8.5
+ .. version-added:: 8.5
:param claim: The claim to add
:type claim: pywikibot.page.Claim
@@ -564,7 +564,7 @@
def removeClaims(self, claims, **kwargs) -> None:
"""Remove the claims from the MediaInfo.
- .. versionadded:: 8.5
+ .. version-added:: 8.5
:param claims: List of claims to be removed
:type claims: List or pywikibot.Claim
@@ -1160,7 +1160,7 @@
def getRedirectTarget(self, *, ignore_section: bool = True):
"""Return the redirect target for this page.
- .. versionadded:: 9.3
+ .. version-added:: 9.3
*ignore_section* parameter
.. seealso:: :meth:`page.BasePage.getRedirectTarget`
@@ -1209,7 +1209,7 @@
If the item doesn't have a link to that site, raise
NoSiteLinkError.
- .. versionchanged:: 8.1
+ .. version-changed:: 8.1
raises NoSiteLinkError instead of NoPageError.
:param site: Site to find the linked page of.
@@ -1301,7 +1301,7 @@
You need to define an extra argument to make this work, like
:code:`save=True`.
- .. versionchanged:: 9.3
+ .. version-changed:: 9.3
*botflag* keyword parameter was renamed to *bot*.
:param target_page: Target of the redirect, this argument is
@@ -1341,7 +1341,7 @@
Return the first 'preferred' ranked Claim specified by Wikibase
property or the first 'normal' one otherwise.
- .. versionadded:: 10.4
+ .. version-added:: 10.4
.. seealso:: :meth:`pywikibot.Page.get_best_claim`
@@ -1377,7 +1377,7 @@
) -> pywikibot.WbRepresentation | None:
"""Return the best value for this page at a given timestamp.
- .. versionadded:: 10.4
+ .. version-added:: 10.4
:param prop: Property id, "P###"
:param timestamp: The timestamp to check the value at
@@ -1506,7 +1506,7 @@
def exists(self) -> bool:
"""Determine if the property exists in the data repository.
- .. versionadded:: 9.4
+ .. version-added:: 9.4
"""
try:
self._type = self.repo.get_property_type(self)
@@ -1519,7 +1519,7 @@
def type(self) -> str:
"""Return the type of this property.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
raises :exc:`NoWikibaseEntityError` if property does not
exist.
@@ -1818,7 +1818,7 @@
def fromJSON(cls, site, data: dict[str, Any]) -> Claim:
"""Create a claim object from JSON returned in the API call.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
print a warning if the Claim.type is not given and missing in
the wikibase.
@@ -2232,7 +2232,7 @@
def has_better_rank(self, other: Claim | None) -> bool:
"""Check if this claim has a better rank than the other claim.
- .. versionadded:: 10.6
+ .. version-added:: 10.6
:param other: The other claim to compare with.
:return: True if this claim has a better rank, False otherwise.
diff --git a/pywikibot/pagegenerators/__init__.py b/pywikibot/pagegenerators/__init__.py
index 6a20400..1983fb6 100644
--- a/pywikibot/pagegenerators/__init__.py
+++ b/pywikibot/pagegenerators/__init__.py
@@ -213,7 +213,7 @@
logevent,username,start,end
- .. deprecated:: 9.2
+ .. version-deprecated:: 9.2
backward compatible *total* argument like
``logevent,username,total``; use ``-limit`` filter
option instead (see below).
diff --git a/pywikibot/pagegenerators/_factory.py b/pywikibot/pagegenerators/_factory.py
index caacf4e..40140b2 100644
--- a/pywikibot/pagegenerators/_factory.py
+++ b/pywikibot/pagegenerators/_factory.py
@@ -132,7 +132,7 @@
Otherwise the value is undefined and gives None.
- .. versionadded:: 7.3
+ .. version-added:: 7.3
"""
def _validate_options(self,
@@ -208,9 +208,9 @@
Only call this after all arguments have been parsed.
- .. versionchanged:: 7.3
+ .. version-changed:: 7.3
set the instance variable :attr:`is_preloading` to True or False.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
if ``limit`` option is set and multiple generators are given,
pages are yieded in a :func:`roundrobin
<tools.itertools.roundrobin_generators>` way.
@@ -351,7 +351,7 @@
gen_func: Callable | None = None) -> Any:
"""Return generator based on Category defined by category and gen_func.
- .. versionchanged::11.1
+ .. version-changed::11.1
*gen_func* is now called with the ``namespaces`` parameter
using the value from :attr:`namespaces`, because the namespace
option is prioritized in :meth:`handle_args`.
@@ -390,7 +390,7 @@
) -> Iterable[pywikibot.page.BasePage] | None:
"""Parse the -logevent argument information.
- .. deprecated:: 9.2
+ .. version-deprecated:: 9.2
the *start* parameter as total amount of pages.
:param logtype: A valid logtype
@@ -945,7 +945,7 @@
def _handle_redirect(self, value: str) -> Literal[True]:
"""Handle `-redirect` argument.
- .. versionadded:: 8.5
+ .. version-added:: 8.5
"""
if not value:
# True by default
@@ -956,7 +956,7 @@
def _handle_pagepile(self, value: str) -> HANDLER_GEN_TYPE:
"""Handle `-pagepile` argument.
- .. versionadded:: 9.0
+ .. version-added:: 9.0
"""
if not value.isnumeric():
raise ValueError(
@@ -966,8 +966,8 @@
def handle_args(self, args: Iterable[str]) -> list[str]:
"""Handle command line arguments and return the rest as a list.
- .. versionadded:: 6.0
- .. versionchanged:: 7.3
+ .. version-added:: 6.0
+ .. version-changed:: 7.3
Prioritize -namespaces options to solve problems with several
generators like -newpages/-random/-randomredirect/-linter
"""
@@ -986,7 +986,7 @@
can try parsing the argument. Call getCombinedGenerator() after all
arguments have been parsed to get the final output generator.
- .. versionadded:: 6.0
+ .. version-added:: 6.0
renamed from ``handleArg``
:param arg: Pywikibot argument consisting of -name:value
diff --git a/pywikibot/pagegenerators/_generators.py b/pywikibot/pagegenerators/_generators.py
index 6edc8ed..cc9421e 100644
--- a/pywikibot/pagegenerators/_generators.py
+++ b/pywikibot/pagegenerators/_generators.py
@@ -52,7 +52,7 @@
) -> Iterable[pywikibot.page.Page]:
"""Iterate Page objects for all titles in a single namespace.
- .. deprecated:: 10.0
+ .. version-deprecated:: 10.0
The *includeredirects* parameter; use *filterredir* instead.
.. seealso:: :meth:`APISite.allpages()
<pywikibot.site._generators.GeneratorsMixin.allpages>`
@@ -112,7 +112,7 @@
) -> Iterable[pywikibot.page.Page]:
"""Prefixed Page generator.
- .. deprecated:: 10.0
+ .. version-deprecated:: 10.0
The *includeredirects* parameter; use *filterredir* instead.
:param prefix: The prefix of the pages.
@@ -225,13 +225,13 @@
For keyword parameters refer :meth:`APISite.recentchanges()
<pywikibot.site._generators.GeneratorsMixin.recentchanges>`.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
The YieldType depends on namespace. It can be
:class:`pywikibot.Page<pywikibot.page.Page>`,
:class:`pywikibot.User<pywikibot.page.User>`,
:class:`pywikibot.FilePage<pywikibot.page.FilePage>` or
:class:`pywikibot.Category<pywikibot.page.Category>`.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
Ignore :class:`pywikibot.FilePage<pywikibot.page.FilePage>` if it
raises a :exc:`ValueError` during upcast e.g. due to an invalid
file extension.
@@ -282,7 +282,7 @@
) -> Iterable[pywikibot.page.Page]:
"""Iterate Page objects for all unconnected pages to a Wikibase repository.
- .. versionchanged::
+ .. version-changed::
The *strict* parameter was added.
:param site: Site for generator results.
@@ -371,7 +371,7 @@
) -> Generator[pywikibot.page.Page]:
"""Yield all subcategories in a specific category.
- .. versionchanged:: 11.1
+ .. version-changed:: 11.1
*namespaces* parameter was added
:param category: The Category object to generate subcategories from
@@ -834,7 +834,7 @@
) -> Iterable[pywikibot.page.Page]:
r"""Yield pages from the MediaWiki internal search engine.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
Keyword arguments *content*, *sort* and *where* was added.
.. seealso:: :meth:`site.search()
@@ -898,9 +898,9 @@
generator prints a warning for each query.
.. seealso:: https://policies.google.com/terms
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
subclassed from :class:`tools.collections.GeneratorWrapper`
- .. versionchanged:: 10.1
+ .. version-changed:: 10.1
``googlesearch-python`` package is needed instead of ``google``,
see :phab:`T387618` for further informations. The *total*
parameter was added. The *query* parameter is positional only.
@@ -947,7 +947,7 @@
.. important:: These note are from 2014 and have not been
reviewed or updated since then.
- .. versionchanged:: 10.1
+ .. version-changed:: 10.1
*query* is positional only; *kwargs* parameter was added.
:param query: The text to search for.
@@ -971,9 +971,9 @@
def generator(self) -> Generator[pywikibot.page.Page]:
"""Yield results from :meth:`queryGoogle` query.
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
changed from iterator method to generator property
- .. versionchanged:: 10.1
+ .. version-changed:: 10.1
use :meth:`site.protocol
<pywikibot.site._basesite.BaseSite.protocol>` to get the base
URL. Also filter duplicates.
@@ -1008,7 +1008,7 @@
:class:`pagegenerators.GeneratorFactory` to circumvent call of
:func:`itertools.islice` filter for this generator.
- .. versionadded:: 10.1
+ .. version-added:: 10.1
"""
self.limit = value
@@ -1101,7 +1101,7 @@
FROM page
LIMIT 10
- .. versionadded:: 9.2
+ .. version-added:: 9.2
:param query: The SQL query string.
:param site: Site for generator results.
@@ -1177,7 +1177,7 @@
"""Xml iterator that yields Page objects.
- .. versionadded:: 7.2
+ .. version-added:: 7.2
the `content` parameter
:param filename: Filename of XML dump
@@ -1365,8 +1365,8 @@
"""Queries PetScan to generate pages.
.. seealso:: https://petscan.wmflabs.org/
- .. versionadded:: 3.0
- .. versionchanged:: 7.6
+ .. version-added:: 3.0
+ .. version-changed:: 7.6
subclassed from :class:`tools.collections.GeneratorWrapper`
"""
@@ -1435,7 +1435,7 @@
def query(self) -> Generator[dict[str, Any]]:
"""Query PetScan.
- .. versionchanged:: 7.4
+ .. version-changed:: 7.4
raises :class:`APIError` if query returns an error message.
:raises ServerError: Either ReadTimeout or server status error
@@ -1464,7 +1464,7 @@
def generator(self) -> Generator[pywikibot.page.Page]:
"""Yield results from :meth:`query`.
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
changed from iterator method to generator property
"""
for raw_page in self.query():
@@ -1477,7 +1477,7 @@
"""Queries PagePile to generate pages.
.. seealso:: https://pagepile.toolforge.org/
- .. versionadded:: 9.0
+ .. version-added:: 9.0
"""
def __init__(self, id: int) -> None:
diff --git a/pywikibot/plural.py b/pywikibot/plural.py
index 289404f..ad2c4da 100644
--- a/pywikibot/plural.py
+++ b/pywikibot/plural.py
@@ -114,6 +114,6 @@
def plural_rule(lang: str) -> PluralRule:
"""Return the plural rule for a given lang.
- .. versionadded:: 4.3
+ .. version-added:: 4.3
"""
return plural_rules.get(lang, plural_rules['_default'])
diff --git a/pywikibot/proofreadpage.py b/pywikibot/proofreadpage.py
index 0a2c665..34733a0 100644
--- a/pywikibot/proofreadpage.py
+++ b/pywikibot/proofreadpage.py
@@ -122,7 +122,7 @@
>>> a.value
'A123'
- .. versionadded:: 8.0
+ .. version-added:: 8.0
"""
def __init__(self, attr, value) -> None:
@@ -173,8 +173,8 @@
to a single attribute value via a WeakKeyDictionary to store
per-instance da
- .. versionadded:: 8.0
- .. versionchanged:: 11.0
+ .. version-added:: 8.0
+ .. version-changed:: 11.0
Never use None as key in WeakKeyDictionary. Class-level access
returns the descriptor itself.
"""
@@ -189,7 +189,7 @@
def __get__(self, obj, objtype=None):
"""Retrieve the value of the attribute for a given instance.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
If *obj* is None (e.g., when accessed via the class rather
than an instance), return the descriptor itself instead of
attempting to use None as a key in the WeakKeyDictionary.
@@ -279,8 +279,8 @@
>>> 'step' in tp
False
- .. versionadded:: 8.0
- .. versionchanged:: 8.1
+ .. version-added:: 8.0
+ .. version-changed:: 8.1
*text* parameter is defaulted to ``'<pages />'``.
"""
@@ -827,7 +827,7 @@
def _url_image_lt_140(self) -> str:
"""Get the file url of the scan of ProofreadPage.
- .. versionadded:: 8.6
+ .. version-added:: 8.6
:return: File url of the scan ProofreadPage or None.
@@ -864,7 +864,7 @@
def _url_image_ge_140(self) -> str:
"""Get the file url of the scan of ProofreadPage.
- .. versionadded:: 8.6
+ .. version-added:: 8.6
:return: File url of the scan of ProofreadPage or None.
:raises ValueError: In case of no image found for scan
@@ -995,9 +995,9 @@
.. warning:: It is the user's responsibility to reset quality
level accordingly.
- .. versionchanged:: 9.2
+ .. version-changed:: 9.2
default for *ocr_tool* is `wmfOCR`.
- .. versionremoved:: 9.2
+ .. version-removed:: 9.2
`phetools` support is not available anymore.
:param ocr_tool: Either 'wmfOCR' or 'googleOCR'; default is 'wmfOCR'
@@ -1284,7 +1284,7 @@
Range is [start ... end], extremes included.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
The *content* parameter was removed
:param start: First page, defaults to 1
diff --git a/pywikibot/scripts/__init__.py b/pywikibot/scripts/__init__.py
index 97e0b27..2b58050 100644
--- a/pywikibot/scripts/__init__.py
+++ b/pywikibot/scripts/__init__.py
@@ -5,8 +5,8 @@
#
"""Folder which holds framework scripts.
-.. versionadded:: 7.0
-.. versionremoved:: 9.4
+.. version-added:: 7.0
+.. version-removed:: 9.4
``preload_sites`` script, previously added in release 6.0
(:phab:`T226157`), was removed (:phab:`T348925`).
"""
@@ -18,8 +18,8 @@
def _import_with_no_user_config(*import_args):
"""Return ``__import__(*import_args)`` without loading user config.
- .. versionadded:: 3.0
- .. versionchanged:: 7.0
+ .. version-added:: 3.0
+ .. version-changed:: 7.0
moved to pywikibot.scripts
"""
orig_no_user_config = getenv('PYWIKIBOT_NO_USER_CONFIG')
diff --git a/pywikibot/scripts/generate_family_file.py b/pywikibot/scripts/generate_family_file.py
index ddf78a1..32564b93 100755
--- a/pywikibot/scripts/generate_family_file.py
+++ b/pywikibot/scripts/generate_family_file.py
@@ -27,13 +27,13 @@
This will create the file mywiki_family.py in families folder of your
base directory.
-.. versionchanged:: 7.0
+.. version-changed:: 7.0
moved to pywikibot.scripts folder; create family files in families
folder of your base directory instead of pywikibot/families.
-.. versionchanged:: 8.1
+.. version-changed:: 8.1
[s]trict can be given for <dointerwiki> parameter to ensure that
sites are from the given domain.
-.. versionchanged:: 8.4
+.. version-changed:: 8.4
If the url scheme is missing, ``https`` will be used.
"""
from __future__ import annotations
@@ -171,7 +171,7 @@
def getlangs(self, w) -> None:
"""Determine site code of a family.
- .. versionchanged:: 8.1
+ .. version-changed:: 8.1
with [e]dit the interwiki list can be given delimited by
space or comma or both. With [s]trict only sites with the
same domain are collected. A [h]elp answer was added to show
diff --git a/pywikibot/scripts/generate_user_files.py b/pywikibot/scripts/generate_user_files.py
index 8fa3d4c..eaccaa0 100755
--- a/pywikibot/scripts/generate_user_files.py
+++ b/pywikibot/scripts/generate_user_files.py
@@ -6,12 +6,12 @@
#
"""Script to create user-config.py. Other file names are not supported.
-.. versionchanged:: 7.0
+.. version-changed:: 7.0
moved to pywikibot.scripts folder.
-.. versionchanged:: 8.0
+.. version-changed:: 8.0
let user the choice which section to be copied.
Also EXTERNAL EDITOR SETTINGS section can be copied.
-.. versionchanged:: 10.7.1
+.. version-changed:: 10.7.1
Default ``PASS_BASENAME`` was changed from ``user-password.py`` to
``user-password.cfg``
"""
@@ -265,7 +265,7 @@
def copy_sections(force: bool = False, default: str = 'n') -> str | None:
"""Take config sections and copy them to user-config.py.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
*force* and *default* options were added.
:param force: Copy all sections if force is True
@@ -299,7 +299,7 @@
default: str = 'n') -> list[str]:
"""Ask for settings to copy.
- .. versionadded:: 8.0
+ .. version-added:: 8.0
:param variant: Variant of the setting section. Either 'framework'
or 'scripts'
diff --git a/pywikibot/scripts/login.py b/pywikibot/scripts/login.py
index 10ea1d7..c978000 100755
--- a/pywikibot/scripts/login.py
+++ b/pywikibot/scripts/login.py
@@ -47,13 +47,13 @@
To log out, throw away the ``*.lwp`` file that is created in the data
subdirectory.
-.. versionchanged:: 7.4
+.. version-changed:: 7.4
moved to :mod:`pywikibot.scripts` folder.
-.. versionchanged:: 7.7
+.. version-changed:: 7.7
*-async* option was added.
-.. versionchanged:: 10.2
+.. version-changed:: 10.2
wildcard site codes in ``usernames`` dict are supported.
-.. versionchanged:: 10.3
+.. version-changed:: 10.3
the -cookies option
"""
from __future__ import annotations
diff --git a/pywikibot/scripts/shell.py b/pywikibot/scripts/shell.py
index 8a35fcd..88aabe5 100755
--- a/pywikibot/scripts/shell.py
+++ b/pywikibot/scripts/shell.py
@@ -17,7 +17,7 @@
python pwb.py shell [args]
-.. versionchanged:: 7.0
+.. version-changed:: 7.0
moved to pywikibot.scripts
"""
from __future__ import annotations
@@ -29,7 +29,7 @@
def main(*args: str) -> None:
"""Script entry point.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
*exitmsg* was added for :func:`code.interact`.
"""
args = list(args)
diff --git a/pywikibot/scripts/version.py b/pywikibot/scripts/version.py
index 832fae7..758af4d 100755
--- a/pywikibot/scripts/version.py
+++ b/pywikibot/scripts/version.py
@@ -11,11 +11,11 @@
-nouser do not print usernames; otherwise they are printed for each
registered family
-.. versionchanged:: 7.0
+.. version-changed:: 7.0
version script was moved to the framework scripts folder.
-.. versionadded:: 9.1.2
+.. version-added:: 9.1.2
the *-nouser* option was added.
-.. versionchanged:: 10.6
+.. version-changed:: 10.6
The User-Agent string is now printed for the default site. To print
it for another site, call the ``pwb`` wrapper with the global option,
e.g.:
@@ -76,7 +76,7 @@
def main(*args: str) -> None:
"""Print pywikibot version and important settings.
- .. versionchanged:: 9.1.2
+ .. version-changed:: 9.1.2
usernames are not printed with ``-nouser`` option.
"""
pywikibot.info('Pywikibot: ' + getversion())
diff --git a/pywikibot/scripts/wrapper.py b/pywikibot/scripts/wrapper.py
index d6f0ca8..dff7baa 100755
--- a/pywikibot/scripts/wrapper.py
+++ b/pywikibot/scripts/wrapper.py
@@ -37,14 +37,14 @@
python pwb.py -code:de bot_tests -v
.. seealso:: :mod:`pwb` entry point
-.. versionchanged:: 7.0
+.. version-changed:: 7.0
pwb wrapper was added to the Python site package lib.
-.. versionchanged:: 7.7
+.. version-changed:: 7.7
pwb wrapper is able to set ``PYWIKIBOT_TEST_...`` environment variables,
see :ref:`Environment variables`.
-.. versionchanged:: 8.0
+.. version-changed:: 8.0
renamed to wrapper.py.
-.. versionchanged:: 9.4
+.. version-changed:: 9.4
enable external scripts via entry points.
"""
from __future__ import annotations
@@ -116,7 +116,7 @@
def run_python_file(filename: str, args: list[str], package=None) -> None:
"""Run a python file as if it were the main program on the command line.
- .. versionchanged:: 7.7
+ .. version-changed:: 7.7
Set and restore ``PYWIKIBOT_TEST_...`` environment variables.
:param filename: The path to the file to execute, it need not be a
@@ -178,7 +178,7 @@
) -> tuple[str, list[str], list[str], list[str]]:
"""Handle args and get filename.
- .. versionchanged:: 7.7
+ .. version-changed:: 7.7
Catch ``PYWIKIBOT_TEST_...`` environment variables.
:return: Filename, script args, local pwb args, environment variables
@@ -391,11 +391,11 @@
def find_filename(filename):
"""Search for the filename in the given script paths.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
Search users_scripts_paths in config.base_dir
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
Add config.base_dir to search path
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
Search in entry point paths
"""
from pywikibot import config
@@ -474,7 +474,7 @@
def execute() -> bool:
"""Parse arguments, extract filename and run the script.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
renamed from :func:`main`
"""
global filename
@@ -541,7 +541,7 @@
def main() -> None:
"""Script entry point. Print doc if necessary.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
previous implementation was renamed to :func:`execute`
"""
if not check_modules():
@@ -554,7 +554,7 @@
def run() -> None: # pragma: no cover
"""Site package entry point. Print doc if necessary.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
"""
global site_package
site_package = True
diff --git a/pywikibot/site/_apisite.py b/pywikibot/site/_apisite.py
index 5975426..b1f9072 100644
--- a/pywikibot/site/_apisite.py
+++ b/pywikibot/site/_apisite.py
@@ -199,7 +199,7 @@
) -> BaseSite:
"""Create a site from a database name using the sitematrix.
- .. versionchanged:: 8.3.3
+ .. version-changed:: 8.3.3
Changed from classmethod to staticmethod.
:param dbname: Database name
@@ -304,7 +304,7 @@
def simple_request(self, **kwargs: Any) -> api.Request:
"""Create a request by defining all kwargs as parameters.
- .. versionadded:: 7.1
+ .. version-added:: 7.1
`_simple_request` becomes a public method
"""
return self._request_class({'parameters': kwargs}).create_simple(
@@ -341,9 +341,9 @@
) -> None:
"""Log the user in if not already logged in.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
lazy load cookies when logging in. This was dropped in 8.0.4
- .. versionchanged:: 8.0.4
+ .. version-changed:: 8.0.4
the *cookie_only* parameter was added and cookies are loaded
whenever the site is initialized.
@@ -486,8 +486,8 @@
def file_extensions(self) -> list[str]:
"""File extensions enabled on the wiki.
- .. versionadded:: 8.4
- .. versionchanged:: 9.2
+ .. version-added:: 8.4
+ .. version-changed:: 9.2
also include extensions from the image repository
"""
ext = self.siteinfo.get('fileextensions')
@@ -499,7 +499,7 @@
def maxlimit(self) -> int:
"""Get the maximum limit of pages to be retrieved.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
"""
parameter = self._paraminfo.parameter('query+info', 'prop')
assert parameter is not None
@@ -586,7 +586,7 @@
.. seealso::
- :class:`tools.collections.RateLimit` for RateLimit examples.
- :api:`Ratelimit`
- .. versionadded:: 9.0
+ .. version-added:: 9.0
:param action: Action which might be limited
:return: RateLimit tuple with ``group``, ``hits`` and ``seconds``
@@ -647,7 +647,7 @@
- :meth:`logged_in` to verify the user is loggend in to a site
.. seealso:: :api:`Userinfo`
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
Use API formatversion 2.
:return: A dict with the following keys and values:
@@ -682,7 +682,7 @@
def userinfo(self) -> None:
"""Delete cached userinfo.
- .. versionadded:: 5.5
+ .. version-added:: 5.5
"""
if hasattr(self, '_userinfo'):
del self._userinfo
@@ -692,7 +692,7 @@
force: bool = False) -> dict[str, Any]:
"""Retrieve globaluserinfo from site and cache it.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
:param user: The user name or user ID whose global info is
retrieved. Defaults to the current user.
@@ -746,7 +746,7 @@
To get globaluserinfo for a given user or user ID use
:meth:`get_globaluserinfo` method instead
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
return self.get_globaluserinfo()
@@ -754,7 +754,7 @@
def globaluserinfo(self) -> None:
"""Delete cached globaluserinfo of current user.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
"""
username = self.username()
assert username is not None
@@ -772,7 +772,7 @@
- :meth:`User.is_blocked()<pywikibot.User.is_blocked>`
- :attr:`userinfo`
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
The *force* parameter was added.
:param force: Whether the cache should be discarded.
@@ -790,7 +790,7 @@
<pywikibot.User.is_partial_blocked>`
- :attr:`userinfo`
- .. versionadded:: 11.0
+ .. version-added:: 11.0
:param force: If True, forces reloading the data from API
"""
@@ -807,7 +807,7 @@
- :meth:`is_blocked`
- :attr:`globaluserinfo`
- .. versionadded:: 7.0
+ .. version-added:: 7.0
:param user: The user name or user ID. Defaults to the current
user.
@@ -855,9 +855,9 @@
Replaces the ``$1`` placeholder from MediaWiki with a
Python-compatible ``{}``.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
- .. versionchanged:: 10.3
+ .. version-changed:: 10.3
raises ValueError instead of AttributeError if "$1"
placeholder is missing.
@@ -876,7 +876,7 @@
Letters that can follow a wikilink and are regarded as part of
this link. This depends on the linktrail setting in LanguageXx.php
- .. versionadded:: 7.3
+ .. version-added:: 7.3
:return: The linktrail regex.
"""
@@ -1178,7 +1178,7 @@
:meth:`BaseSite.redirects()
<pywikibot.site._basesite.BaseSite.redirects>`
- .. versionadded:: 8.4
+ .. version-added:: 8.4
"""
return [s.lstrip('#') for s in self.getmagicwords('redirect')]
@@ -1380,10 +1380,10 @@
>>> page is None
True
- .. versionchanged:: 7.7
+ .. version-changed:: 7.7
No longer raise NotimplementedError if used with a Wikibase
site.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
No longer raise UnknownExtensionError if site is not
connected to a wikibase but retern None instead.
@@ -1420,7 +1420,7 @@
If optional argument *all_ns* is true, return all recognized
values for this namespace.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
*all* parameter was renamed to *all_ns*.
:param num: Namespace constant.
@@ -1512,9 +1512,9 @@
.. note:: Parameters validation and error handling left to the
API call.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
*mediatype* and *bitdepth* properties were added.
- .. versionchanged:: 8.6.
+ .. version-changed:: 8.6.
Added *timestamp* parameter.
Metadata are loaded only if *history* is False.
.. seealso:: :api:`Imageinfo`
@@ -1610,7 +1610,7 @@
) -> pywikibot.page.Page:
"""Return page object for the redirect target of page.
- .. versionadded:: 9.3
+ .. version-added:: 9.3
*ignore_section* parameter
.. seealso:: :meth:`page.BasePage.getRedirectTarget`
@@ -1741,10 +1741,10 @@
You should not call this method directly, especially if you only
need a specific token. Use :attr:`tokens` property instead.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
*all* parameter is deprecated. Use an empty list for
``types`` instead.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
*all* parameter was removed.
.. seealso:: :api:`Tokens`
@@ -1802,7 +1802,7 @@
'1c8...9d3+\\'
>>> del site.tokens # another variant to clear the cache
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
``tokens`` attribute became a property to enable deleter.
.. warning:: A deprecation warning is shown if the token name is
outdated, see :api:`Tokens (action)`.
@@ -1819,7 +1819,7 @@
def get_parsed_page(self, page: BasePage) -> str:
"""Retrieve parsed text of the page using action=parse.
- .. versionchanged:: 7.1
+ .. version-changed:: 7.1
raises KeyError instead of AssertionError
.. seealso::
@@ -1887,7 +1887,7 @@
If more than one target id is provided, the same action is taken for
all of them.
- .. versionadded:: 6.0
+ .. version-added:: 6.0
:param targettype: Type of target. One of "archive", "filearchive",
"logging", "oldimage", "revision".
@@ -2407,7 +2407,7 @@
.. seealso:: :api:`Move`
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
The `movesubpages` parameter was added
:param page: The Page to be moved (must exist)
@@ -2518,7 +2518,7 @@
will revert the last edit(s) made by the specified user on the
given page.
- .. versionchanged:: 10.5
+ .. version-changed:: 10.5
Added *pageid* as alternative to *page* (one must be given).
*markbot* defaults to True if the rollbacker is a bot and not
explicitly given. The method now returns a dictionary with
@@ -2650,16 +2650,16 @@
To delete a specific version of an image the oldimage identifier
must be provided.
- .. versionadded:: 6.1
+ .. version-added:: 6.1
renamed from `deletepage`
- .. versionchanged:: 6.1
+ .. version-changed:: 6.1
keyword only parameter `oldimage` was added.
- .. versionchanged:: 7.1
+ .. version-changed:: 7.1
keyword only parameter `deletetalk` was added.
- .. versionchanged:: 8.1
+ .. version-changed:: 8.1
raises :exc:`exceptions.NoPageError` if page does not exist.
:param page: Page to be deleted or its pageid.
@@ -2739,10 +2739,10 @@
.. seealso:: :api:`Undelete`
- .. versionadded:: 6.1
+ .. version-added:: 6.1
renamed from `undelete_page`
- .. versionchanged:: 6.1
+ .. version-changed:: 6.1
`fileids` parameter was added,
keyword argument required for `revisions`.
@@ -2792,7 +2792,7 @@
>>> sorted(site.protection_types())
['create', 'edit', 'move', 'upload']
- .. deprecated:: 10.5
+ .. version-deprecated:: 10.5
Use :attr:`restrictions[types]<restrictions>` instead.
:return: Protection types available
@@ -2809,7 +2809,7 @@
>>> sorted(site.protection_levels())
['', 'autoconfirmed', ... 'sysop', 'templateeditor']
- .. deprecated:: 10.5
+ .. version-deprecated:: 10.5
Use :attr:`restrictions[levels]<restrictions>` instead.
:return: Protection levels available
@@ -2829,7 +2829,7 @@
>>> sorted(r['levels'])
['', 'autoconfirmed', ... 'sysop', 'templateeditor']
- .. versionadded:: 10.5
+ .. version-added:: 10.5
.. seealso:: :meth:`page_restrictions`
:return: Dict with keys 'types', 'levels', 'cascadinglevels' and
@@ -3000,7 +3000,7 @@
) -> bool:
"""Add or remove pages from watchlist.
- .. versionchanged:: 10.4.0
+ .. version-changed:: 10.4.0
Added the *expiry* parameter to specify watch expiry time.
Passing *unwatch* as a positional parameter is deprecated;
it must be passed as keyword argument.
@@ -3144,10 +3144,10 @@
Either source_filename or source_url, but not both, must be provided.
- .. versionchanged:: 6.0
+ .. version-changed:: 6.0
keyword arguments required for all parameters except `filepage`
- .. versionchanged:: 6.2:
+ .. version-changed:: 6.2:
asynchronous upload is used if `asynchronous` parameter is set.
For keyword arguments refer :class:`pywikibot.site._upload.Uploader`
diff --git a/pywikibot/site/_basesite.py b/pywikibot/site/_basesite.py
index 19a34a5..c821ea8 100644
--- a/pywikibot/site/_basesite.py
+++ b/pywikibot/site/_basesite.py
@@ -54,14 +54,14 @@
introspection in this hot path and is safe because Family
methods are guaranteed to be pure Python.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
Only delegate to public Family methods which have ``code`` as
first parameter.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
Use direct ``__code__`` inspection instead of
``inspect.signature()`` to significantly improve attribute
access performance.
- .. versionchanged:: 11.1
+ .. version-changed:: 11.1
:meth:`__getattr__` raises NotImplementedError instead of
AttributeError if a Family method or attribute exists but
cannot be delegated. This can happen if *name* is not a method
@@ -260,7 +260,7 @@
def languages(self) -> list[str]:
"""Return list of all valid site codes for this site's Family.
- .. deprecated:: 9.6
+ .. version-deprecated:: 9.6
Use :meth:`codes` instead.
"""
return sorted(self.codes)
@@ -269,7 +269,7 @@
def codes(self) -> set[str]:
"""Return set of all valid site codes for this site's Family.
- .. versionadded:: 9.6
+ .. version-added:: 9.6
.. seealso:: :attr:`family.Family.codes`
"""
return set(self.family.langs.keys())
@@ -309,7 +309,7 @@
def redirect(self) -> str:
"""Return a default redirect tag for the site.
- .. versionchanged:: 8.4
+ .. version-changed:: 8.4
return a single generic redirect tag instead of a list of
tags. For the list use :meth:`redirects` instead.
"""
@@ -319,7 +319,7 @@
"""Return list of generic redirect tags for the site.
.. seealso:: :meth:`redirect` for the default redirect tag.
- .. versionadded:: 8.4
+ .. version-added:: 8.4
"""
return ['REDIRECT']
@@ -410,7 +410,7 @@
arbitrary stuff, then a wikilink. The wikilink may contain a
label, although this is not useful.
- .. versionadded:: 8.4
+ .. version-added:: 8.4
moved from class:`APISite<pywikibot.site._apisite.APISite>`
"""
tags = '|'.join(self.redirects())
diff --git a/pywikibot/site/_datasite.py b/pywikibot/site/_datasite.py
index 0ed840b..492596a 100644
--- a/pywikibot/site/_datasite.py
+++ b/pywikibot/site/_datasite.py
@@ -58,7 +58,7 @@
support that entity type either.
.. seealso:: https://www.mediawiki.org/wiki/Wikibase/Federation
- .. versionadded:: 8.0
+ .. version-added:: 8.0
:raises ValueError: when invalid entity type was provided
"""
@@ -243,7 +243,7 @@
This is used specifically because we can cache the value for a
much longer time (near infinite).
- .. versionadded:: 9.5
+ .. version-added:: 9.5
:raises NoWikibaseEntityError: *prop* does not exist
"""
@@ -273,7 +273,7 @@
def getPropertyType(self, prop):
"""Obtain the type of a property.
- .. deprecated:: 9.5
+ .. version-deprecated:: 9.5
Use :meth:`get_property_type` instead.
"""
try:
@@ -293,7 +293,7 @@
``item`` if dict with API parameters was passed to *entity*
parameter.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
*tags* keyword argument was added
:param entity: Page to edit, or dict with API parameters
@@ -359,7 +359,7 @@
tags: str | None = None) -> None:
"""Add a claim.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
*tags* parameter was added
:param entity: Entity to modify
@@ -396,7 +396,7 @@
tags: str | None = None):
"""Set the claim target to the value of the provided claim target.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
*tags* parameter was added
:param claim: The source of the claim target value
@@ -438,7 +438,7 @@
tags: str | None = None):
"""Save the whole claim to the wikibase site.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
*tags* parameter was added
:param claim: The claim to save
@@ -481,9 +481,9 @@
tags: str | None = None):
"""Create/Edit a source.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
*tags* parameter was added
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
deprecated *baserevid* parameter was removed
:param claim: A Claim object to add the source to.
@@ -541,9 +541,9 @@
tags: str | None = None):
"""Create/Edit a qualifier.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
*tags* parameter was added
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
deprecated *baserevid* parameter was removed
:param claim: A Claim object to add the qualifier to
@@ -590,9 +590,9 @@
tags: str | None = None):
"""Remove claims.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
*tags* parameter was added
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
deprecated *baserevid* parameter was removed
:param claims: Claims to be removed
@@ -627,9 +627,9 @@
tags: str | None = None):
"""Remove sources.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
*tags* parameter was added
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
deprecated `baserevid` parameter was removed
:param claim: A Claim object to remove the sources from
@@ -661,9 +661,9 @@
tags: str | None = None):
"""Remove qualifiers.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
*tags* parameter was added
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
deprecated `baserevid` parameter was removed
:param claim: A Claim object to remove the qualifier from
@@ -693,7 +693,7 @@
bot: bool = True) -> dict:
"""Link two pages together.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
*tags* parameter was added
:param page1: First page to link
@@ -724,7 +724,7 @@
tags: str | None = None) -> dict:
"""Merge two items together.
- .. versionchanged:: 9.4
+ .. version-changed:: 9.4
*tags* parameter was added
:param from_item: Item to merge from
@@ -835,7 +835,7 @@
validate: bool = False) -> list[Any]:
"""Send data values to the wikibase parser for interpretation.
- .. versionadded:: 7.5
+ .. version-added:: 7.5
.. seealso:: `wbparsevalue API
<https://www.wikidata.org/w/api.php?action=help&modules=wbparsevalue>`_
diff --git a/pywikibot/site/_extensions.py b/pywikibot/site/_extensions.py
index d951ec7..7ca81f9 100644
--- a/pywikibot/site/_extensions.py
+++ b/pywikibot/site/_extensions.py
@@ -183,7 +183,7 @@
Load URLs to images for a given page in the "Page:" namespace.
No effect for pages in other namespaces.
- .. versionadded:: 8.6
+ .. version-added:: 8.6
.. seealso:: :api:`imageforpage`
"""
@@ -302,7 +302,7 @@
.. warning:: The retrieved pages may be connected in meantime.
To avoid this, use *strict* parameter to check.
- .. versionchanged::
+ .. version-changed::
The *strict* parameter was added.
:param total: Maximum number of pages to return, or ``None`` for
@@ -431,7 +431,7 @@
"""APISite mixin for TextExtracts extension.
- .. versionadded:: 7.1
+ .. version-added:: 7.1
"""
@need_extension('TextExtracts')
diff --git a/pywikibot/site/_generators.py b/pywikibot/site/_generators.py
index 7086b93..bc429cd 100644
--- a/pywikibot/site/_generators.py
+++ b/pywikibot/site/_generators.py
@@ -134,11 +134,11 @@
pagelist. In case of duplicates in a groupsize batch, return the
first entry.
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
*content* parameter was added.
- .. versionchanged:: 7.7
+ .. version-changed:: 7.7
*categories* parameter was added.
- .. versionchanged:: 8.1
+ .. version-changed:: 8.1
*groupsize* is maxlimit by default. *quiet* parameter was
added. No longer show the "Retrieving pages from site"
message by default.
@@ -354,7 +354,7 @@
.. seealso:: :api:`Redirects`
- .. versionadded:: 7.0
+ .. version-added:: 7.0
:param page: The Page to get redirects for.
:param filter_fragments: If True, only return redirects with fragments.
@@ -459,7 +459,7 @@
) -> Iterable[pywikibot.Page]:
"""Iterate categories to which page belongs.
- .. versionadded:: 9.6
+ .. version-added:: 9.6
the *with_sort_key* parameter.
.. seealso::
@@ -581,9 +581,9 @@
- :meth:`pywikibot.Category.members`
- :meth:`pywikibot.Category.subcategories`
- .. versionchanged:: 4.0
+ .. version-changed:: 4.0
parameters except *category* are keyword arguments only.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
raises TypeError instead of Error if no Category is specified
.. seealso:: :api:`Categorymembers`
@@ -874,7 +874,7 @@
) -> Generator[pywikibot.Link]:
"""Yield all interlanguage links on page, yielding Link objects.
- .. versionchanged:: 6.2:
+ .. version-changed:: 6.2:
`include_empty_titles` parameter was added.
.. seealso:: :api:`Langlinks`
@@ -1291,7 +1291,7 @@
"""Iterate Pages that contain links to the given FilePage.
.. seealso:: :api:`Imageusage`
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
all parameters except `image` are keyword only.
:param image: The image to search for (FilePage need not exist on
@@ -1392,7 +1392,7 @@
**kwargs) -> Generator[dict[str, Any]]:
"""Yield entries from Special:AbuseLog.
- .. versionadded:: 11.0
+ .. version-added:: 11.0
.. seealso::
:api:`Abuselog`
@@ -1436,7 +1436,7 @@
) -> Iterable[dict[str, Any]]:
"""Iterate recent changes.
- .. versionchanged:: 10.1
+ .. version-changed:: 10.1
*page* parameter was added.
.. seealso:: :api:`RecentChanges`
@@ -1528,13 +1528,13 @@
Note that this may include non-existing Pages if the wiki's
database table contains outdated entries.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
Default of `where` parameter has been changed from 'text' to
None. The behaviour depends on the installed search engine
which is 'text' on CirrusSearch'.
raises APIError instead of Error if searchstring is not set
or what parameter is wrong.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
The *sort* parameter was added.
.. seealso:: :api:`Search`
@@ -1869,7 +1869,7 @@
random.
.. seealso:: :api:`Random`
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
Raises ``TypeError`` instead of ``AssertionError`` if
*redirects* is invalid.
@@ -2058,7 +2058,7 @@
API.
.. seealso:: :api:`Querypage`
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
Raises ``ValueError`` instead of ``AssertionError`` if
*special_page* is invalid.
@@ -2310,7 +2310,7 @@
:py:obj:`APISite.allpages`, while it uses for 'create' the
'query+protectedtitles' module.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
*type* parameter was renamed to *protect_type*.
.. seealso:: :api:`Protectedtitles`
@@ -2366,7 +2366,7 @@
.. note:: ``watched_pages`` is a restartable generator. See
:class:`tools.collections.GeneratorWrapper` for its usage.
.. seealso:: :api:`Watchlistraw`
- .. versionadded:: 8.1
+ .. version-added:: 8.1
the *with_talkpage* parameter.
:param force: Reload watchlist
diff --git a/pywikibot/site/_namespace.py b/pywikibot/site/_namespace.py
index f11490a..f4fc547 100644
--- a/pywikibot/site/_namespace.py
+++ b/pywikibot/site/_namespace.py
@@ -49,7 +49,7 @@
def canonical(self) -> str:
"""Canonical form of MediaWiki built-in namespace.
- .. versionadded:: 7.1
+ .. version-added:: 7.1
"""
name = '' if self == 0 else self.name.capitalize().replace('_', ' ')
return name.replace('Mediawiki', 'MediaWiki')
@@ -59,7 +59,7 @@
"""Metaclass for Namespace attribute settings.
- .. versionadded:: 9.0
+ .. version-added:: 9.0
"""
def __new__(cls, name, bases, dic):
@@ -86,7 +86,7 @@
If only one of canonical_name and custom_name are available, both
properties will have the same value.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
metaclass from :class:`MetaNamespace`
"""
@@ -149,7 +149,7 @@
def canonical_namespaces(cls) -> dict[int, str]:
"""Return the canonical forms of MediaWiki built-in namespaces.
- .. versionchanged:: 7.1
+ .. version-changed:: 7.1
implemented as classproperty using BuiltinNamespace IntEnum.
"""
return {item.value: item.canonical for item in BuiltinNamespace}
@@ -188,7 +188,7 @@
This method is implemented to be independent from __len__ method.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
:return: Always return True like generic object class.
"""
diff --git a/pywikibot/site/_siteinfo.py b/pywikibot/site/_siteinfo.py
index 17c187f..b1a58ce 100644
--- a/pywikibot/site/_siteinfo.py
+++ b/pywikibot/site/_siteinfo.py
@@ -32,7 +32,7 @@
All values of the 'general' property are directly available.
- .. versionchanged:: 10.5
+ .. version-changed:: 10.5
formatversion 2 is used for API calls.
.. admonition:: Compatibility note
@@ -50,7 +50,7 @@
:code:`'thumblimits': [120, 150, 180, 200, 220, 250, 300, 400]`
- .. deprecated:: 10.5
+ .. version-deprecated:: 10.5
Accessing the fallback '*' keys in 'languages', 'namespaces',
'namespacealiases', and 'skins' properties are deprecated and
will be removed in a future release of Pywikibot.
@@ -70,7 +70,7 @@
def clear(self) -> None:
"""Clear all cached siteinfo properties.
- .. versionadded:: 7.1
+ .. version-added:: 7.1
"""
self._cache.clear()
@@ -81,7 +81,7 @@
Modifies *data* in place.
- .. versionchanged:: 10.5
+ .. version-changed:: 10.5
Modify *data* for formatversion 1 compatibility and easier
to use lists.
@@ -333,7 +333,7 @@
def is_cached(self, key: str) -> bool:
"""Return whether the value is cached.
- .. versionadded:: 7.1
+ .. version-added:: 7.1
"""
try:
self._get_cached(key)
@@ -349,7 +349,7 @@
like `key in container`.Only string keys are valid. Non-string
keys always return False.
- .. versionchanged:: 7.1
+ .. version-changed:: 7.1
Previous implementation only checked for cached keys.
:param key: The key to check for presence. Should be a string.
diff --git a/pywikibot/site/_tokenwallet.py b/pywikibot/site/_tokenwallet.py
index 9608682..b404c35 100644
--- a/pywikibot/site/_tokenwallet.py
+++ b/pywikibot/site/_tokenwallet.py
@@ -34,7 +34,7 @@
def __getitem__(self, key: str) -> str:
"""Get token value for the given key.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
Support of legacy API tokens was dropped.
"""
if self.site.user() is None and key != 'login':
@@ -77,7 +77,7 @@
>>> repr(site.tokens)
"TokenWallet(pywikibot.Site('wikipedia:test'))"
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
Provide a string which looks like a valid Python expression.
"""
user = f', user={self._currentuser!r}' if self._currentuser else ''
@@ -87,7 +87,7 @@
def clear(self) -> None:
"""Clear the self._tokens cache. Tokens are reloaded when needed.
- .. versionadded:: 8.0
+ .. version-added:: 8.0
"""
self._tokens.clear()
@@ -111,7 +111,7 @@
r._params['token'] = r.site.tokens.update_tokens(r._params['token'])
- .. versionadded:: 8.0
+ .. version-added:: 8.0
:param tokens: A list of token types that need to be updated.
:return: A list of updated tokens corresponding to the given
diff --git a/pywikibot/site/_upload.py b/pywikibot/site/_upload.py
index 8b2dbf3..2301296 100644
--- a/pywikibot/site/_upload.py
+++ b/pywikibot/site/_upload.py
@@ -23,7 +23,7 @@
"""Uploader class to upload a file to the wiki.
- .. versionadded:: 7.1
+ .. version-added:: 7.1
:param site: The current site to work on
:param filepage: a FilePage object from which the wiki-name of the
diff --git a/pywikibot/site_detect.py b/pywikibot/site_detect.py
index 70286dd..bcbd627 100644
--- a/pywikibot/site_detect.py
+++ b/pywikibot/site_detect.py
@@ -275,11 +275,11 @@
def check_response(response) -> None:
"""Raise ClientError or ServerError depending on http status.
- .. versionadded:: 3.0
- .. versionchanged:: 7.0
+ .. version-added:: 3.0
+ .. version-changed:: 7.0
Raise a generic :class:`exceptions.ServerError` if http status
code is not IANA-registered but unofficial code
- .. versionchanged:: 8.1
+ .. version-changed:: 8.1
Raise a :class:`exceptions.ClientError` if status code is 4XX
"""
for status_code, err_class, err_type in [
diff --git a/pywikibot/specialbots/_upload.py b/pywikibot/specialbots/_upload.py
index 0460d6f..ea0574d 100644
--- a/pywikibot/specialbots/_upload.py
+++ b/pywikibot/specialbots/_upload.py
@@ -48,7 +48,7 @@
bot.post_processor = summarize
bot.run()
- .. versionadded:: 9.1
+ .. version-added:: 9.1
"""
def __init__(self, url: list[str] | str, *,
@@ -68,9 +68,9 @@
**kwargs) -> None:
"""Initializer.
- .. versionchanged:: 6.2
+ .. version-changed:: 6.2
asynchronous upload is used if *asynchronous* parameter is set
- .. versionchanged:: 6.4
+ .. version-changed:: 6.4
*force_if_shared* parameter was added
:param url: path to url or local file, or list of urls or paths
@@ -239,7 +239,7 @@
def process_filename(self, file_url: str) -> str | None:
"""Return base filename portion of *file_url*.
- .. versionchanged:: 10.2
+ .. version-changed:: 10.2
no longer shows the description if UploadRobot's parameter
*verify_description* is set to False.
@@ -394,7 +394,7 @@
If the upload fails, ask the user whether to try again or not.
If the user chooses not to retry, return None.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
If 'copyuploadbaddomain' API error occurred in first step,
download the file and upload it afterwards
@@ -473,7 +473,7 @@
def run(self) -> None:
"""Run bot.
- .. versionchanged:: 9.1
+ .. version-changed:: 9.1
count uploads.
"""
if self.skip_run():
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index d2a6e19..5ccaacf 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -118,7 +118,7 @@
languages, and that it returns an unchanged string if an
unsupported language is given.
- .. versionchanged:: 7.5
+ .. version-changed:: 7.5
always return a string even `phrase` is an int.
:param phrase: The phrase to convert to localized numerical
@@ -137,8 +137,8 @@
langs: Sequence[str] | str | None = None) -> str:
"""Change non-ascii digits to ascii digits.
- .. versionadded:: 7.0
- .. versionchanged:: 10.3
+ .. version-added:: 7.0
+ .. version-changed:: 10.3
this function was renamed from to_latin_digits.
:param phrase: The phrase to convert to ascii numerical.
@@ -162,8 +162,8 @@
def case_escape(case: str, string: str, *, underscore: bool = False) -> str:
"""Return an escaped regex pattern which depends on 'first-letter' case.
- .. versionadded:: 7.0
- .. versionchanged:: 8.4
+ .. version-added:: 7.0
+ .. version-changed:: 8.4
Added the optional *underscore* parameter.
:param case: If `case` is 'first-letter', the regex contains an
@@ -226,7 +226,7 @@
def ignore_case(string: str) -> str:
"""Return a case-insensitive pattern for the string.
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
`_ignore_case` becomes a public method
"""
return ''.join(
@@ -314,7 +314,7 @@
) -> list[re.Pattern[str]]:
"""Fetch compiled regexes.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
``_get_regexes`` becomes a public function.
*keys* may be a single string; *site* is optional.
@@ -510,7 +510,7 @@
* includeonly tags
* source and syntaxhighlight tags
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
the order of removals will correspond to the tags argument
if provided as an ordered collection (list, tuple)
@@ -564,7 +564,7 @@
.. caution:: Tag names must be given in lowercase.
- .. versionchanged:: 10.3
+ .. version-changed:: 10.3
The *removetags* parameter was added. Refactored to use
:class:`GetDataHTML` and its ``__call__`` method. tag attributes
will be kept.
@@ -638,10 +638,10 @@
.. caution:: Tag names must be given in lowercase.
- .. versionchanged:: 9.2
+ .. version-changed:: 9.2
No longer a context manager
- .. versionchanged:: 10.3
+ .. version-changed:: 10.3
Public class now. Added support for removals of tag contents.
.. seealso::
@@ -709,7 +709,7 @@
listed in *removetags* begin a skip block, and their content
will be excluded from the output.
- .. versionchanged:: 10.3
+ .. version-changed:: 10.3
Keep tag attributes.
:param tag: The tag name (e.g., "div", "script") converted to
@@ -820,7 +820,7 @@
function which returns a Link instance and copies the value which should
remaining.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
`site` parameter is mandatory
:param text: The text in which to replace links
@@ -1044,7 +1044,7 @@
def add_text(text: str, add: str, *, site=None) -> str:
"""Add text to a page content above categories and interwiki.
- .. versionadded:: 6.4
+ .. version-added:: 6.4
:param text: The page content to add text to.
:param add: Text to add.
@@ -1092,7 +1092,7 @@
"""A namedtuple as part of :class:`Content` describing a page section.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
``_Section`` becomes a public class.
"""
@@ -1103,7 +1103,7 @@
def level(self) -> int:
"""Return the section level.
- .. versionadded:: 8.2
+ .. version-added:: 8.2
"""
m = HEAD_PATTERN.match(self.title)
return len(m[1])
@@ -1112,8 +1112,8 @@
def heading(self) -> str:
"""Return the section title without equal signs.
- .. versionadded:: 8.2
- .. versionchanged:: 11.0
+ .. version-added:: 8.2
+ .. version-changed:: 11.0
Invisible chars like LTR or RTO are removed.
"""
level = self.level
@@ -1128,7 +1128,7 @@
Introduced for handling lists of sections with custom lookup by
:attr:`Section.heading` and :attr:`level<Section.level>`.
- .. versionadded:: 10.4
+ .. version-added:: 10.4
"""
def __contains__(self, value: object) -> bool:
@@ -1220,7 +1220,7 @@
"""A namedtuple as result of :func:`extract_sections` holding page content.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
``_Content`` becomes a public class.
"""
@@ -1234,7 +1234,7 @@
The first main title is anything enclosed within triple quotes.
- .. versionadded:: 8.2
+ .. version-added:: 8.2
"""
m = TITLE_PATTERN.search(self.header)
return m[1].strip() if m else ''
@@ -1335,11 +1335,11 @@
.. note:: sections and text from templates are not extracted but
embedded as plain text.
- .. versionadded:: 3.0
- .. versionchanged:: 8.2
+ .. version-added:: 3.0
+ .. version-changed:: 8.2
The :class:`Content` and :class:`Section` class have additional
properties.
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
Added custom ``index()``, ``count()`` and ``in`` operator support
for :attr:`Content.sections`.
@@ -1516,7 +1516,7 @@
template_subpage: bool = False) -> str:
"""Replace inter-language links in the text with a new set of links.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
*addOnly* was renamed to *add_only*.
:param oldtext: The text that needs to be modified.
@@ -1849,7 +1849,7 @@
add_only: bool = False) -> str:
"""Replace all existing category links with new category links.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
*addOnly* was renamed to *add_only*.
:param oldtext: The text that needs to be replaced.
@@ -2052,7 +2052,7 @@
:param strip: If enabled, strip arguments and values of templates.
:return: List of template name and params
- .. versionchanged:: 6.1
+ .. version-changed:: 6.1
*wikitextparser* package is supported; either *wikitextparser* or
*mwparserfromhell* is strictly recommended.
"""
@@ -2201,7 +2201,7 @@
Attribute order is important to avoid mismatch when searching.
- .. versionadded:: 8.0
+ .. version-added:: 8.0
"""
time: re.Pattern[str]
@@ -2215,7 +2215,7 @@
"""Find timestamp in page and return it as pywikibot.Timestamp object.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
*group* attribute is a set instead of a list.
*patterns* is a :class:`TimeStripperPatterns` namedtuple instead
of a list.
@@ -2354,7 +2354,7 @@
All the following items must be matched, otherwise None is
returned: -. year, month, hour, time, day, minute, tzinfo
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
HTML parts are removed from line
:return: A timestamp found on the given line
diff --git a/pywikibot/throttle.py b/pywikibot/throttle.py
index b55e8c8..64adc90 100644
--- a/pywikibot/throttle.py
+++ b/pywikibot/throttle.py
@@ -102,7 +102,7 @@
def next_multiplicity(self) -> float:
"""Factor to scale delay time based on upcoming request size.
- .. deprecated:: 10.3.0
+ .. version-deprecated:: 10.3.0
"""
return 1.0
@@ -111,7 +111,7 @@
def next_multiplicity(self, value: float) -> None:
"""Setter for delay scaling factor for the next request.
- .. deprecated:: 10.3.0
+ .. version-deprecated:: 10.3.0
This property has no effect and is retained for backward
compatibility.
"""
@@ -120,7 +120,7 @@
def _module_hash(module: str | None = None) -> str:
"""Convert called module name to a hash.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
Set hashlib constructor *usedforsecurity* argument to ``False``
because the hash is not used in a security context. Use ``md5``
hash algorithm for GraalPy implementation instead of
@@ -175,7 +175,7 @@
def checkMultiplicity(self) -> None:
"""Count running processes for site and set process_multiplicity.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
process is not written to throttle.ctrl file if site is empty.
"""
global pid
@@ -227,7 +227,7 @@
) -> None:
"""Set the nominal delays in seconds.
- .. deprecated:: 10.3.0
+ .. version-deprecated:: 10.3.0
Use :meth:`set_delays` instead.
"""
self.set_delays(delay=delay, writedelay=writedelay, absolute=absolute)
@@ -242,7 +242,7 @@
Defaults to config values.
- .. versionadded:: 10.3.0
+ .. version-added:: 10.3.0
Renamed from :meth:`setDelays`.
"""
with self.lock:
@@ -261,7 +261,7 @@
def getDelay(self, write: bool = False) -> float:
"""Return the current delay, adjusted for active processes.
- .. deprecated:: 10.3.0
+ .. version-deprecated:: 10.3.0
Use :meth:`get_delay` instead.
"""
return self.get_delay(write=write)
@@ -276,9 +276,9 @@
consider how much time has passed since the last access — use
:meth:`waittime` for that.
- .. versionadded:: 10.3.0
+ .. version-added:: 10.3.0
Renamed from :meth:`getDelay`.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
The delay now takes any pending :attr:`retry_after` into
account.
@@ -301,7 +301,7 @@
def waittime(self, write: bool = False):
"""Return waiting time in seconds.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
Use the latest request timestamp for read operation.
The result is for a query that would be made right now.
@@ -359,10 +359,10 @@
This method blocks the calling thread if the minimum delay has
not yet elapsed since the last read or write operation.
- .. versionchanged:: 10.3.0
+ .. version-changed:: 10.3.0
The *write* parameter is now keyword-only.
- .. deprecated:: 10.3.0
+ .. version-deprecated:: 10.3.0
The *requestsize* parameter has no effect and will be removed
in a future release.
diff --git a/pywikibot/time.py b/pywikibot/time.py
index 33c30ac..b093e9a 100644
--- a/pywikibot/time.py
+++ b/pywikibot/time.py
@@ -5,7 +5,7 @@
#
"""Time handling module.
-.. versionadded:: 7.5
+.. version-added:: 7.5
"""
from __future__ import annotations
@@ -28,7 +28,7 @@
'TZoneFixedOffset'
)
-#: .. versionadded:: 7.5
+#: .. version-added:: 7.5
MW_KEYS = types.MappingProxyType({
's': 'seconds',
'h': 'hours',
@@ -67,7 +67,7 @@
this is more reliable than using :meth:`Timestamp.utcnow` or
:meth:`Timestamp.nowutc`.
- .. versionchanged:: 7.5
+ .. version-changed:: 7.5
moved to :mod:`time` module
"""
@@ -88,8 +88,8 @@
- ISO8601 format: ``YYYY-MM-DD[T ]HH:MM:SS[Z|±HH[MM[SS[.ffffff]]]]``
- POSIX format: seconds from Unix epoch ``S{1,13}[.ffffff]]``
- .. versionadded:: 7.5
- .. versionchanged:: 8.0
+ .. version-added:: 7.5
+ .. version-changed:: 8.0
raises *TypeError* instead of *ValueError*.
:param ts: Timestamp, datetime.datetime or str
@@ -109,7 +109,7 @@
def _from_datetime(dt: datetime.datetime) -> Timestamp:
"""Convert a datetime.datetime timestamp to a Timestamp object.
- .. versionadded:: 7.5
+ .. version-added:: 7.5
"""
return Timestamp(dt.year, dt.month, dt.day, dt.hour,
dt.minute, dt.second, dt.microsecond,
@@ -121,7 +121,7 @@
Mediwiki timestamp format: YYYYMMDDHHMMSS
- .. versionadded:: 7.5
+ .. version-added:: 7.5
"""
RE_MW = r'\d{14}' # noqa: N806
m = re.fullmatch(RE_MW, timestr)
@@ -139,7 +139,7 @@
ISO8601 format:
``YYYY-MM-DD[T ]HH:MM:SS[[.,]ffffff][Z|±HH[MM[SS[.ffffff]]]]``
- .. versionadded:: 7.5
+ .. version-added:: 7.5
"""
RE_ISO8601 = (r'(?:\d{4}-\d{2}-\d{2})(?P<sep>[T ])' # noqa: N806
r'(?:\d{2}:\d{2}:\d{2})(?P<u>[.,]\d{1,6})?'
@@ -179,7 +179,7 @@
POSIX format: ``SECONDS[.ffffff]]``
- .. versionadded:: 7.5
+ .. version-added:: 7.5
"""
RE_POSIX = r'(?P<S>-?\d{1,13})(?:\.(?P<u>\d{1,6}))?' # noqa: N806
m = re.fullmatch(RE_POSIX, timestr)
@@ -202,7 +202,7 @@
def _from_string(cls, timestr: str) -> Timestamp:
"""Convert a string to a Timestamp object.
- .. versionadded:: 7.5
+ .. version-added:: 7.5
"""
handlers = [
cls._from_mw,
@@ -261,9 +261,9 @@
strict: bool = False) -> Timestamp:
"""Convert a MediaWiki internal timestamp to a Timestamp object.
- .. versionchanged:: 3.0
+ .. version-changed:: 3.0
create a Timestamp if only year, month and day are given.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
the *strict* parameter was added which discards missing
element tolerance.
@@ -319,21 +319,21 @@
See Note in datetime.timestamp().
- .. versionadded:: 7.5
+ .. version-added:: 7.5
"""
return self.replace(tzinfo=datetime.timezone.utc).timestamp()
def posix_timestamp_format(self) -> str:
"""Convert object to a POSIX timestamp format.
- .. versionadded:: 7.5
+ .. version-added:: 7.5
"""
return f'{self.posix_timestamp():.6f}'
def __repr__(self) -> str:
"""Unify repr string between CPython and Pypy (T325905).
- .. versionadded:: 8.0
+ .. version-added:: 8.0
"""
s = super().__repr__()
return f'{type(self).__name__}{s[s.find("("):]}'
@@ -365,7 +365,7 @@
aware Timestamps/datetimes (i.e. missing or having timezone).
A TypeError will be raised in such cases.
- .. versionadded:: 9.0
+ .. version-added:: 9.0
.. seealso::
- :python:`datetime.now()
<library/datetime.html#datetime.datetime.now>`
@@ -411,7 +411,7 @@
.. hint::
This method might be deprecated later.
- .. versionadded:: 9.0
+ .. version-added:: 9.0
.. seealso::
:python:`datetime.utcnow()
<library/datetime.html#datetime.datetime.utcnow>`
diff --git a/pywikibot/titletranslate.py b/pywikibot/titletranslate.py
index 36c7b0b..2ae609b 100644
--- a/pywikibot/titletranslate.py
+++ b/pywikibot/titletranslate.py
@@ -23,7 +23,7 @@
entries such as "all:" or "xyz:" or "20:" are first built from the
page title of 'page' and then listed.
- .. versionchanged:: 9.6
+ .. version-changed:: 9.6
Raise ``RuntimeError`` instead of ``AssertionError`` if neither
*page* nor *site* parameter is given.
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 43d3867..5637d18 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -100,7 +100,7 @@
def is_ip_address(value: str) -> bool:
"""Check if a value is a valid IPv4 or IPv6 address.
- .. versionadded:: 6.1
+ .. version-added:: 6.1
Was renamed from ``is_IP()``.
.. seealso:: :func:`is_ip_network`
@@ -116,7 +116,7 @@
def is_ip_network(value: str) -> bool:
"""Check if a value is a valid range of IPv4 or IPv6 addresses.
- .. versionadded:: 9.0
+ .. version-added:: 9.0
.. seealso:: :func:`is_ip_address`
:param value: Value to check
@@ -131,9 +131,9 @@
def has_module(module: str, version: str | None = None) -> bool:
"""Check if a module can be imported.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
- .. versionchanged:: 6.1
+ .. version-changed:: 6.1
Dependency of distutils was dropped because the package will be
removed with Python 3.12.
"""
@@ -170,7 +170,7 @@
Foo.bar gives 'baz'.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
def __init__(self, cls_method) -> None:
@@ -206,7 +206,7 @@
Those suppressed warnings that do not match the parameters will be
raised shown upon exit.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
def __init__(
@@ -270,7 +270,7 @@
"""Mixin class to allow comparing to other objects which are comparable.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
@abc.abstractmethod
@@ -279,7 +279,7 @@
This ensures that ``_cmpkey`` method is defined in subclass.
- .. versionadded:: 8.1.2
+ .. version-added:: 8.1.2
"""
def __lt__(self, other):
@@ -317,7 +317,7 @@
>>> first_lower('Hello World')
'hello World'
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
return string[:1].lower() + string[1:]
@@ -332,7 +332,7 @@
>>> first_upper('hello World')
'Hello World'
- .. versionadded:: 3.0
+ .. version-added:: 3.0
.. note:: MediaWiki doesn't capitalize some characters the same way
as Python. This function tries to be close to MediaWiki's
capitalize function in title.php. See :phab:`T179115` and
@@ -371,7 +371,7 @@
...
ValueError: Invalid repl parameter '?'
- .. versionadded:: 8.0
+ .. version-added:: 8.0
:param string: The string to be modified
:param repl: The replacement character
@@ -400,7 +400,7 @@
...
ValueError: invalid truth value 'aye'
- .. versionadded:: 7.1
+ .. version-added:: 7.1
:param val: True values are 'y', 'yes', 't', 'true', 'on', and '1';
false values are 'n', 'no', 'f', 'false', 'off', and '0'.
@@ -417,7 +417,7 @@
def normalize_username(username) -> str | None:
"""Normalize the username.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
if not username:
return None
@@ -446,9 +446,9 @@
Any other suffixes are considered invalid.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
- .. versionchanged:: 6.1
+ .. version-changed:: 6.1
Dependency of distutils was dropped because the package will be
removed with Python 3.12.
"""
@@ -515,7 +515,7 @@
def __repr__(self) -> str:
"""Return version number representation, mainly used by tests.
- .. versionadded:: 10.0
+ .. version-added:: 10.0
"""
return f"'{self}'"
@@ -552,7 +552,7 @@
The compression is either selected via the magic number or file
ending.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
:param filename: The filename.
:param mode: The mode in which the file should be opened. It may
@@ -651,7 +651,7 @@
also possible to define an additional dict using the keyword
arguments.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
args = [*list(args), dict(kwargs)]
conflicts = set()
@@ -674,7 +674,7 @@
) -> None:
"""Check file mode and update it, if needed.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
:param filename: Filename path
:param mode: Requested file mode
@@ -706,8 +706,8 @@
Result is expressed as hexdigest().
- .. versionadded:: 3.0
- .. versionchanged:: 8.2
+ .. version-added:: 3.0
+ .. version-changed:: 8.2
The *sha* parameter may also be a hash constructor, or a callable
that returns a hash object.
@@ -765,7 +765,7 @@
.. note:: A property must be decorated on top of the property method
below other decorators. This decorator must not be used with
functions.
- .. versionadded:: 7.3
+ .. version-added:: 7.3
:raises TypeError: Decorator must be used without arguments
"""
diff --git a/pywikibot/tools/_deprecate.py b/pywikibot/tools/_deprecate.py
index ee35f8d..9044a1c 100644
--- a/pywikibot/tools/_deprecate.py
+++ b/pywikibot/tools/_deprecate.py
@@ -20,7 +20,7 @@
only one arg, and that arg be a callable, as it will be detected as
a deprecator without any arguments.
-.. versionchanged:: 6.4
+.. version-changed:: 6.4
deprecation decorators moved to _deprecate submodule
"""
from __future__ import annotations
@@ -53,7 +53,7 @@
"""Feature that is no longer implemented.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
@@ -82,7 +82,7 @@
def manage_wrapping(wrapper, obj) -> None:
"""Add attributes to wrapper and wrapped functions.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
wrapper.__doc__ = obj.__doc__
wrapper.__name__ = obj.__name__
@@ -110,7 +110,7 @@
def get_wrapper_depth(wrapper):
"""Return depth of wrapper function.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
return wrapper.__wrapped__.__wrappers__ + (1 - wrapper.__depth__)
@@ -177,9 +177,9 @@
def _build_msg_string(instead: str | None, since: str | None) -> str:
"""Build a deprecation warning message format string.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
`since`parameter must be a release number, not a timestamp.
:param instead: Suggested replacement for the deprecated object
@@ -202,10 +202,10 @@
since: str | None = None) -> None:
"""Issue a deprecation warning.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
*since* parameter must be a release number, not a timestamp.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
*warning_class* and *since* are keyword-only parameters.
:param name: The name of the deprecated object
@@ -227,7 +227,7 @@
def deprecated(*args, **kwargs):
"""Decorator to output a deprecation warning.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
`since` keyword must be a release number, not a timestamp.
:keyword str instead: If provided, will be used to specify the
@@ -339,7 +339,7 @@
reserved words even for future Python releases and to prevent syntax
errors.
- .. versionchanged:: 9.2
+ .. version-changed:: 9.2
bool type of *new_arg* is no longer supported.
:param old_arg: Old keyword
@@ -359,12 +359,12 @@
def my_function(bar='baz'): pass
# replaces 'foo' keyword by 'bar' and ignores 'baz' keyword
- .. versionchanged:: 3.0.20200703
+ .. version-changed:: 3.0.20200703
show a FutureWarning if the *arg_pairs* value is True; don't show
a warning if the value is an empty string.
- .. versionchanged:: 6.4
+ .. version-changed:: 6.4
show a FutureWarning for renamed arguments
- .. versionchanged:: 9.2
+ .. version-changed:: 9.2
bool type argument is no longer supported.
:param arg_pairs: Each entry points to the new argument name. If an
@@ -497,10 +497,10 @@
keyword-only arguments must match the order of the old positional
parameters; otherwise, argument assignment may fail.
- .. versionadded:: 9.2
- .. versionchanged:: 10.4
+ .. version-added:: 9.2
+ .. version-changed:: 10.4
Raises ``ValueError`` if method has a ``*args`` parameter.
- .. versionchanged:: 10.6
+ .. version-changed:: 10.6
Renamed from ``deprecate_positionals``. Adds handling of
positional-only parameters and emits warnings if they are passed
as keyword arguments.
@@ -697,10 +697,10 @@
It also acts like marking that function deprecated and copies all
parameters.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
*since* parameter must be a release number, not a timestamp.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
All parameters except *target* are keyword-only parameters.
:param target: The targeted function which is to be executed.
@@ -777,7 +777,7 @@
future_warning: bool = True) -> None:
"""Add the name to the local deprecated names dict.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
``since`` parameter must be a release number, not a timestamp.
:param name: The name of the deprecated class or variable. It may not
diff --git a/pywikibot/tools/chars.py b/pywikibot/tools/chars.py
index 9691b01..9ed74f1 100644
--- a/pywikibot/tools/chars.py
+++ b/pywikibot/tools/chars.py
@@ -98,7 +98,7 @@
For a single *encodings* string this function is equivalent to
:samp:`urllib.parse.unquote(title, encodings, errors='strict')`
- .. versionchanged:: 8.4
+ .. version-changed:: 8.4
Ignore *LookupError* and try other encodings.
.. seealso:: :python:`urllib.parse.unquote
diff --git a/pywikibot/tools/collections.py b/pywikibot/tools/collections.py
index f061c31..9bec020 100644
--- a/pywikibot/tools/collections.py
+++ b/pywikibot/tools/collections.py
@@ -63,7 +63,7 @@
>>> list(data)
[]
- .. versionadded:: 6.1
+ .. version-added:: 6.1
"""
def __init__(self, keyattr: str) -> None:
@@ -144,7 +144,7 @@
"""An error that gets caught by both KeyError and IndexError.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
@@ -159,8 +159,8 @@
Accessing a value via __getitem__ will result in a combined KeyError and
IndexError.
- .. versionadded:: 3.0
- .. versionchanged:: 6.2
+ .. version-added:: 3.0
+ .. version-changed:: 6.2
``empty_iterator()`` was removed in favour of ``iter()``.
"""
@@ -185,8 +185,8 @@
"""A generator that allows items to be added during generating.
- .. versionadded:: 3.0
- .. versionchanged:: 6.1
+ .. version-added:: 3.0
+ .. version-changed:: 6.1
Provide a representation string.
"""
@@ -212,7 +212,7 @@
<reference/expressions.html#generator.close>` mixin method and it can
be used as Iterable and Iterator as well.
- .. versionadded:: 7.6
+ .. version-added:: 7.6
Example:
@@ -290,10 +290,10 @@
<reference/expressions.html#generator.throw>` for various
parameter usage.
- .. versionchanged:: 10.7
+ .. version-changed:: 10.7
The *val* and *tb* parameters were renamed to *value* and
*traceback*.
- .. deprecated:: 10.7
+ .. version-deprecated:: 10.7
The ``(type, value, traceback)`` signature is deprecated; use
single-arg signature ``throw(value)`` instead.
@@ -364,7 +364,7 @@
>>> newlimit.ratio
inf
- .. versionadded:: 9.0
+ .. version-added:: 9.0
"""
group: str = 'unknown'
diff --git a/pywikibot/tools/formatter.py b/pywikibot/tools/formatter.py
index cbb8976..3d8defa 100644
--- a/pywikibot/tools/formatter.py
+++ b/pywikibot/tools/formatter.py
@@ -57,7 +57,7 @@
def output(self) -> None:
"""Output the text of the current sequence.
- .. deprecated:: 9.0
+ .. version-deprecated:: 9.0
Use :func:`pywikibot.info()<pywikibot.logging.info>` with
:attr:`out` property.
"""
diff --git a/pywikibot/tools/itertools.py b/pywikibot/tools/itertools.py
index 9814f9d..d0771ff 100644
--- a/pywikibot/tools/itertools.py
+++ b/pywikibot/tools/itertools.py
@@ -77,7 +77,7 @@
>>> list(union_generators([4, 3, 2, 1], [5, 4, 3], [6, 2], reverse=True))
[6, 5, 4, 3, 2, 1]
- .. versionadded:: 10.6
+ .. version-added:: 10.6
.. note::
All input iterables must be sorted consistently. *reverse* must
@@ -116,19 +116,19 @@
['m', 'i', 's', 's', 'i']
- .. versionadded:: 3.0
+ .. version-added:: 3.0
- .. versionchanged:: 5.0
+ .. version-changed:: 5.0
Avoid duplicates (:phab:`T263947`).
- .. versionchanged:: 6.4
+ .. version-changed:: 6.4
``genlist`` was renamed to ``iterables``; consecutive iterables
are to be used as iterables parameters or '*' to unpack a list
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
Reimplemented without threads which is up to 10'000 times faster
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
Iterable elements may consist of lists or tuples
``allow_duplicates`` is a keyword-only argument
@@ -205,8 +205,8 @@
>>> tuple(roundrobin_generators('ABC', range(5)))
('A', 0, 'B', 1, 'C', 2, 3, 4)
- .. versionadded:: 3.0
- .. versionchanged:: 6.4
+ .. version-added:: 3.0
+ .. version-changed:: 6.4
A sentinel variable is used to determine the end of an iterable
instead of None.
@@ -248,7 +248,7 @@
.. warning:: This is not thread safe.
- .. versionadded:: 3.0
+ .. version-added:: 3.0
:param iterable: The source iterable
:type iterable: Collections.abc.Iterable
diff --git a/pywikibot/tools/threading.py b/pywikibot/tools/threading.py
index 93e7af6..659ef17 100644
--- a/pywikibot/tools/threading.py
+++ b/pywikibot/tools/threading.py
@@ -47,7 +47,7 @@
>>> data
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
- .. versionadded:: 3.0
+ .. version-added:: 3.0
"""
def __init__(self, group=None, target=None, name: str = 'GeneratorThread',
@@ -135,7 +135,7 @@
for x in range(20):
pool.append(threading.Thread(target=work))
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
the unintentional and undocumented *args* parameter was removed.
.. seealso:: :class:`BoundedPoolExecutor`
@@ -183,7 +183,7 @@
block further items on :meth:`submit` calls to be added to workers
queue if the *max_bound* limit is reached.
- .. versionadded:: 10.0
+ .. version-added:: 10.0
.. seealso::
- :pylib:`concurrent.futures.html#executor-objects`
diff --git a/pywikibot/userinterfaces/_interface_base.py b/pywikibot/userinterfaces/_interface_base.py
index 5252b0a..3b5fb72 100644
--- a/pywikibot/userinterfaces/_interface_base.py
+++ b/pywikibot/userinterfaces/_interface_base.py
@@ -5,7 +5,7 @@
#
"""Abstract base user interface module.
-.. versionadded:: 6.2
+.. version-added:: 6.2
"""
from __future__ import annotations
@@ -21,7 +21,7 @@
Every user interface should derive from it to ensure that all
required methods are implemented.
- .. versionadded:: 6.2
+ .. version-added:: 6.2
"""
def argvu(self) -> list[str]:
diff --git a/pywikibot/userinterfaces/buffer_interface.py b/pywikibot/userinterfaces/buffer_interface.py
index 3fba15c..3544351 100644
--- a/pywikibot/userinterfaces/buffer_interface.py
+++ b/pywikibot/userinterfaces/buffer_interface.py
@@ -1,9 +1,9 @@
"""Non-interactive interface that stores output.
-.. versionadded:: 6.4
+.. version-added:: 6.4
"""
#
-# (C) Pywikibot team, 2021-2025
+# (C) Pywikibot team, 2021-2026
#
# Distributed under the terms of the MIT license.
#
@@ -23,7 +23,7 @@
"""Collects output into an unseen buffer.
- .. versionadded:: 6.4
+ .. version-added:: 6.4
"""
def __init__(self) -> None:
diff --git a/pywikibot/userinterfaces/gui.py b/pywikibot/userinterfaces/gui.py
index 8c47ef9..35de194 100644
--- a/pywikibot/userinterfaces/gui.py
+++ b/pywikibot/userinterfaces/gui.py
@@ -520,7 +520,7 @@
def get_image(photo: str, width, height):
"""Take the BytesIO object and build an imageTK thumbnail.
- .. versionchanged:: 11.1
+ .. version-changed:: 11.1
PSD files are not allowed for ``Pillow < 12.1.1``.
:raises ImportError: Pillow is not installed
diff --git a/pywikibot/userinterfaces/terminal_interface_base.py b/pywikibot/userinterfaces/terminal_interface_base.py
index a568a20..aa99573 100644
--- a/pywikibot/userinterfaces/terminal_interface_base.py
+++ b/pywikibot/userinterfaces/terminal_interface_base.py
@@ -60,7 +60,7 @@
"""Base for terminal user interfaces.
- .. versionchanged:: 6.2:
+ .. version-changed:: 6.2:
subclassed from
:py:obj:`userinterfaces._interface_base.ABUIC`
"""
@@ -73,7 +73,7 @@
This caches the std-streams locally so any attempts to
monkey-patch the streams later will not work.
- .. versionchanged:: 7.1
+ .. version-changed:: 7.1
memorize original streams
"""
# for Windows GUI they can be None under some conditions
@@ -164,7 +164,7 @@
against the frozen streams, and then write to the (potentially
redirected) `sys.stderr` or `sys.stdout` stream.
- .. versionchanged:: 7.1
+ .. version-changed:: 7.1
instead of writing to `target_stream`, dispatch to
`sys.stderr` or `sys.stdout`.
"""
@@ -242,7 +242,7 @@
in cache. They will be printed with next unlocked output call or
at termination time.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
Forward text to cache and flush if output is not locked.
"""
self.cache_output(text, targetStream=targetStream)
@@ -252,7 +252,7 @@
def flush(self) -> None:
"""Output cached text.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
"""
with self.lock:
for args, kwargs in self.cache:
@@ -262,7 +262,7 @@
def cache_output(self, *args, **kwargs) -> None:
"""Put text to cache.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
"""
with self.lock:
self.cache.append((args, kwargs))
@@ -274,7 +274,7 @@
terminal, it will be replaced with a question mark or by a
transliteration.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
``UI.output()`` was renamed to ``UI.stream_output()``
"""
if config.transliterate:
@@ -418,7 +418,7 @@
not be sensible when the option supports multiple values as
it'll return an ambiguous index.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
Raise ValueError if no *default* value is given with *force*;
raise ValueError if *force* is True and *default* value is
invalid; raise TypeError if *default* value is neither str
diff --git a/pywikibot/userinterfaces/transliteration.py b/pywikibot/userinterfaces/transliteration.py
index 2536499..7d1c38d 100644
--- a/pywikibot/userinterfaces/transliteration.py
+++ b/pywikibot/userinterfaces/transliteration.py
@@ -1132,9 +1132,9 @@
prev: str = '-', succ: str = '-') -> str:
"""Transliterate the character.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
*next* parameter was renamed to *succ*.
- .. versionchanged:: 10.6
+ .. version-changed:: 10.6
*char* argument is positional only; *prev* and *succ*
arguments are keyword only.
diff --git a/pywikibot/version.py b/pywikibot/version.py
index 3c3e493..561cdd5 100644
--- a/pywikibot/version.py
+++ b/pywikibot/version.py
@@ -36,8 +36,8 @@
def get_toolforge_hostname() -> str | None:
"""Get hostname of the current Toolforge host.
- .. versionadded:: 3.0
- .. deprecated:: 9.0
+ .. version-added:: 3.0
+ .. version-deprecated:: 9.0
:return: The hostname of the currently running host,
if it is in Wikimedia Toolforge; otherwise return None.
diff --git a/pywikibot/xmlreader.py b/pywikibot/xmlreader.py
index 9f1ccc3..929f669 100644
--- a/pywikibot/xmlreader.py
+++ b/pywikibot/xmlreader.py
@@ -11,7 +11,7 @@
https://dumps.wikimedia.org/backup-index.html) and offers a generator over
XmlEntry objects which can be used by other bots.
-.. versionchanged:: 7.7
+.. version-changed:: 7.7
*defusedxml* is used in favour of *xml.etree* if present to prevent
vulnerable XML attacks. *defusedxml* 0.7.1 or higher is recommended.
"""
@@ -61,7 +61,7 @@
"""Represent the common info of a page.
- .. versionadded:: 9.0
+ .. version-added:: 9.0
"""
title: str
@@ -76,7 +76,7 @@
"""Represent a raw revision.
- .. versionadded:: 9.0
+ .. version-added:: 9.0
"""
headers: Headers
@@ -91,11 +91,11 @@
Reads the local file at initialization,
parses it, and offers access to the resulting XmlEntries via a generator.
- .. versionadded:: 7.2
+ .. version-added:: 7.2
the `on_error` parameter
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
`allrevisions` parameter must be given as keyword parameter
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
`allrevisions` parameter is deprecated due to :phab:`T340804`,
`revisions` parameter was introduced as replacement.
`root` attribute was removed.
@@ -173,7 +173,7 @@
def parse(self) -> Iterator[XmlEntry]:
"""Generator using ElementTree iterparse function.
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
if a ParseError occurs it can be handled by the callable
given with `on_error` parameter of this instance.
"""
@@ -212,7 +212,7 @@
def _parse_only_first_found(self, elem: Element) -> Iterator[XmlEntry]:
"""Parser that yields the first revision found.
- .. versionadded:: 9.0
+ .. version-added:: 9.0
"""
raw_revs = self._fetch_revs(elem)
try:
@@ -231,7 +231,7 @@
def _parse_only_earliest(self, elem: Element) -> Iterator[XmlEntry]:
"""Parser that yields only the earliest revision.
- .. versionadded:: 9.0
+ .. version-added:: 9.0
"""
raw_revs = self._fetch_revs(elem, with_id=True)
raw_rev = min(raw_revs, default=None, key=lambda rev: rev.revid)
@@ -247,7 +247,7 @@
def _fetch_revs(self, elem: Element, with_id=False) -> Iterator[RawRev]:
"""Yield all revisions in a page.
- .. versionadded:: 9.0
+ .. version-added:: 9.0
"""
uri = self.uri
headers = self._headers(elem)
@@ -262,7 +262,7 @@
Returns strings representing user groups allowed to edit and
to move a page, where None means there are no restrictions.
- .. versionadded:: 9.0
+ .. version-added:: 9.0
replaces deprecated ``parseRestrictions`` function.
"""
if not restrictions:
diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index 5b3ffb2..efa68af 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -173,23 +173,23 @@
Version historty:
-.. versionchanged:: 7.6
+.. version-changed:: 7.6
Localized variables for the ``archive`` parameter are supported.
``User:MiszaBot/config`` is the default template. The ``-keep`` option
was added.
-.. versionchanged:: 7.7
+.. version-changed:: 7.7
``-sort`` and ``-async`` options were added.
-.. versionchanged:: 8.2
+.. version-changed:: 8.2
KeyboardInterrupt support added when using the ``-async`` option.
-.. versionchanged:: 10.3
+.. version-changed:: 10.3
If ``archiveheader`` is not set, the bot now attempts to retrieve a
localized template from Wikidata (based on known item IDs). If none is
found, ``{{talkarchive}}`` is used as fallback.
-.. versionchanged:: 11.0
+.. version-changed:: 11.0
The ``-namespace`` option is now respected by ``-page`` option.
"""
from __future__ import annotations
@@ -410,7 +410,7 @@
def __getattr__(self, name):
"""Lazy load page if archives, header or threads attribute is missing.
- .. versionadded:: 8.1
+ .. version-added:: 8.1
"""
if name in ('archives', 'header', 'threads'):
self.load_page()
@@ -423,7 +423,7 @@
) -> pywikibot.Timestamp | None:
"""Calculate the maximum of two timestamps but allow None as value.
- .. versionadded:: 7.6
+ .. version-added:: 7.6
"""
if ts1 is None:
return ts2
@@ -443,9 +443,9 @@
If no such localized template is found, it falls back to the
default ``{{talkarchive}}`` template.
- .. versionadded:: 10.2
+ .. version-added:: 10.2
- .. versionchanged:: 10.3
+ .. version-changed:: 10.3
Returns ``{{talkarchive}}`` by default if no localized
template is found.
@@ -464,12 +464,12 @@
def load_page(self) -> None:
"""Load the page to be archived and break it up into threads.
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
If `-keep` option is given run through all threads and set
the current timestamp to the previous if the current is lower.
- .. versionchanged:: 7.7
+ .. version-changed:: 7.7
Load unsigned threads using timestamp of the next thread.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
Use explicit check for 'archiveheader' to avoid eager
evaluation of :meth:`get_header_template` when an
archiveheader exists within archive template.
@@ -559,7 +559,7 @@
(characters). This corresponds to MediaWiki's definition
of page size.
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
return 0 if archive page neither exists nor has threads
(:phab:`T313886`).
"""
@@ -575,7 +575,7 @@
asynchronous: bool = False) -> None:
"""Recombine threads and save page.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
the *asynchronous* parameter was added.
"""
if sort_threads:
@@ -602,7 +602,7 @@
asynchronous: bool = False) -> None:
"""Initializer.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
The *asynchronous* parameter was added.
:param page: a page object to be archived
@@ -647,7 +647,7 @@
def info(self, msg: str = '') -> None:
"""Forward text to cache if asynchronous is activated.
- .. versionadded:: 10.0
+ .. version-added:: 10.0
"""
if self.asynchronous:
self.output.append(msg)
@@ -657,7 +657,7 @@
def flush(self) -> None:
"""Flush the cache.
- .. versionadded:: 10.0
+ .. version-added:: 10.0
"""
pywikibot.info('\n'.join(self.output))
self.output.clear()
@@ -904,7 +904,7 @@
def run(self) -> None:
"""Process a single DiscussionPage object.
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
save the talk page in asynchronous mode if ``-async`` option
was given but archive pages are saved in synchronous mode.
"""
@@ -978,10 +978,10 @@
:return: Return True to continue with the next page, False to break
the loop.
- .. versionadded:: 7.6
- .. versionchanged:: 7.7
+ .. version-added:: 7.6
+ .. version-changed:: 7.7
pass an unspecified number of arguments to the bot using ``*args``
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
*asynchronous* parameter was added.
"""
global outlock
diff --git a/scripts/blockpageschecker.py b/scripts/blockpageschecker.py
index d7d8d7a..4c7524c 100755
--- a/scripts/blockpageschecker.py
+++ b/scripts/blockpageschecker.py
@@ -185,7 +185,7 @@
"""Bot to remove stale protection templates from unprotected pages.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
CheckerBot is a ConfigParserBot
"""
diff --git a/scripts/category.py b/scripts/category.py
index 0aeff5c..6dc4eaf 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -154,7 +154,7 @@
The sample above would remove 'Hydraulics' category from all pages which
are also in 'Pneumatics' category.
-.. versionchanged:: 8.0
+.. version-changed:: 8.0
:mod:`pagegenerators` are supported with "move" and "remove" action.
"""
from __future__ import annotations
@@ -583,7 +583,7 @@
Per default the operation applies to pages and subcategories.
- .. versionadded:: 8.0
+ .. version-added:: 8.0
The ``generator`` parameter.
"""
@@ -730,7 +730,7 @@
- _change()
- _delete()
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
if a page generator is given to the bot, the intersection
with :func:`pagegenerators.CategorizedPageGenerator` or
:func:`pagegenerators.SubCategoriesPageGenerator` is used.
@@ -1345,7 +1345,7 @@
robot = CategoryTreeRobot(
'Physics', db, 'physics_tree.txt', max_depth=5)
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
*max_depth* is keyword only.
:param cat_title: The category that serves as the root of the
@@ -1397,7 +1397,7 @@
given category *cat*, up to the depth specified by
``self.max_depth``. This method is recursive.
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
*parent* is keyword only.
Example:
@@ -1482,7 +1482,7 @@
- :wiki:`WP:SUBCAT`
- :wiki:`WP:DIFFUSE`
- .. versionadded:: 7.0
+ .. version-added:: 7.0
"""
update_options = {
diff --git a/scripts/category_graph.py b/scripts/category_graph.py
index e602360..69cea23 100755
--- a/scripts/category_graph.py
+++ b/scripts/category_graph.py
@@ -48,7 +48,7 @@
fillcolor=green] edge[style=dashed penwidth=3]'
-.. versionadded:: 8.0
+.. version-added:: 8.0
"""
from __future__ import annotations
diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py
index d7f6855..fd60ea3 100755
--- a/scripts/category_redirect.py
+++ b/scripts/category_redirect.py
@@ -79,10 +79,10 @@
"""Page category update bot.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
CategoryRedirectBot is a ConfigParserBot
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
A logentry is written to <userpage>/category_edit_requests if a
page cannot be moved
"""
diff --git a/scripts/change_pagelang.py b/scripts/change_pagelang.py
index c328802..3598779 100755
--- a/scripts/change_pagelang.py
+++ b/scripts/change_pagelang.py
@@ -25,7 +25,7 @@
.. note:: This script is a
:class:`ConfigParserBot<bot.ConfigParserBot>`. All options can be set
within a settings file which is scripts.ini by default.
-.. versionadded:: 5.1
+.. version-added:: 5.1
"""
from __future__ import annotations
@@ -43,7 +43,7 @@
"""Change page language bot.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
ChangeLangBot is a ConfigParserBot
"""
diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index 23cf0ad..7048490 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -76,7 +76,7 @@
Text= This is the template that the bot will use when it will
report the image's problem.
-.. versionchanged:: 8.4
+.. version-changed:: 8.4
Welcome messages are imported from :mod:`scripts.welcome` script.
"""
from __future__ import annotations
@@ -410,7 +410,7 @@
CATEGORIES_WITH_LICENSES = 'Q4481876', 'Q7451504'
"""Category items with the licenses; subcategories may contain other licenses.
-.. versionchanged:: 7.2
+.. version-changed:: 7.2
uses wikibase items instead of category titles.
"""
@@ -782,7 +782,7 @@
) -> pywikibot.FilePage:
"""Get tuples of image and time, return the most used or oldest image.
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
itertools.zip_longest is used to stop `using_pages` as soon as
possible.
@@ -1105,7 +1105,7 @@
def load_licenses(self) -> set[pywikibot.Page]:
"""Load the list of the licenses.
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
return a set instead of a list for quicker lookup.
"""
pywikibot.info('\nLoading the allowed licenses...\n')
diff --git a/scripts/commons_information.py b/scripts/commons_information.py
index 98f517d..2178438 100755
--- a/scripts/commons_information.py
+++ b/scripts/commons_information.py
@@ -58,8 +58,8 @@
python pwb.py commons_information -start:File:!
-.. versionadded:: 6.0
-.. versionchanged:: 9.2
+.. version-added:: 6.0
+.. version-changed:: 9.2
accelerate script with preloading pages; use ``commons`` as default
site; use transcluded pages of ``Information`` template.
"""
@@ -190,7 +190,7 @@
Combine all nodes and replace the last with new created
Template while removing the remaining from *wikicode*.
- .. versionadded:: 9.2
+ .. version-added:: 9.2
:param wikicode: The Wikicode of the parsed page text.
:param nodes: wikitext nodes to be processed
diff --git a/scripts/commonscat.py b/scripts/commonscat.py
index 78d8b88..5d54b6b 100755
--- a/scripts/commonscat.py
+++ b/scripts/commonscat.py
@@ -240,7 +240,7 @@
"""Commons categorisation bot.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
CommonscatBot is a ConfigParserBot
"""
diff --git a/scripts/coordinate_import.py b/scripts/coordinate_import.py
index 689712f..ed97b48 100755
--- a/scripts/coordinate_import.py
+++ b/scripts/coordinate_import.py
@@ -61,7 +61,7 @@
"""A bot to import coordinates to Wikidata.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
CoordImportRobot is a ConfigParserBot
"""
diff --git a/scripts/cosmetic_changes.py b/scripts/cosmetic_changes.py
index 093afa1..28fba60 100755
--- a/scripts/cosmetic_changes.py
+++ b/scripts/cosmetic_changes.py
@@ -71,7 +71,7 @@
def treat_page(self) -> None:
"""Treat page with the cosmetic toolkit.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
skip if InvalidPageError is raised
"""
cc_toolkit = CosmeticChangesToolkit(self.current_page,
diff --git a/scripts/delinker.py b/scripts/delinker.py
index b0e4b86..d7be775 100755
--- a/scripts/delinker.py
+++ b/scripts/delinker.py
@@ -35,9 +35,9 @@
don't want the default values you can add any option you want to
change to that settings file below the [delinker] section like.
-.. versionadded:: 7.2
+.. version-added:: 7.2
This script is completely rewritten from compat branch.
-.. versionchanged:: 9.4
+.. version-changed:: 9.4
*-category* option was added.
"""
from __future__ import annotations
diff --git a/scripts/djvutext.py b/scripts/djvutext.py
index 3238483..076f465 100755
--- a/scripts/djvutext.py
+++ b/scripts/djvutext.py
@@ -57,7 +57,7 @@
Works only on sites with Proofread Page extension installed.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
CheckerBot is a ConfigParserBot
"""
diff --git a/scripts/download_dump.py b/scripts/download_dump.py
index 22b25c7..800a9c0 100755
--- a/scripts/download_dump.py
+++ b/scripts/download_dump.py
@@ -18,7 +18,7 @@
.. note:: This script is a
:class:`ConfigParserBot<bot.ConfigParserBot>`. All options can be set
within a settings file which is scripts.ini by default.
-.. versionadded:: 3.0.20180108
+.. version-added:: 3.0.20180108
"""
from __future__ import annotations
@@ -36,7 +36,7 @@
"""Download dump bot.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
DownloadDumpBot is a ConfigParserBot
"""
diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py
index 2b5a706..b977370 100755
--- a/scripts/harvest_template.py
+++ b/scripts/harvest_template.py
@@ -110,7 +110,7 @@
.. note:: This script is a
:py:obj:`ConfigParserBot <bot.ConfigParserBot>`. All options
can be set within a settings file which is scripts.ini by default.
-.. versionadded:: 7.5
+.. version-added:: 7.5
the -inverse option.
"""
from __future__ import annotations
@@ -168,7 +168,7 @@
"""A bot to add Wikidata claims.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
HarvestRobot is a ConfigParserBot
"""
@@ -242,7 +242,7 @@
link_text: str) -> pywikibot.ItemPage | None:
"""Find the ItemPage target for a given link text.
- .. versionchanged:: 7.5
+ .. version-changed:: 7.5
Only follow the redirect target if redirect page has no
wikibase item.
"""
@@ -323,7 +323,7 @@
field_item: tuple[str, str]) -> None:
"""Process a single field of template fielddict.
- .. versionadded:: 7.5
+ .. version-added:: 7.5
"""
field, value = field_item
field = field.strip()
@@ -387,7 +387,7 @@
) -> Generator[pywikibot.ItemPage]:
"""Handle 'wikibase-item' claim type.
- .. versionadded:: 7.5
+ .. version-added:: 7.5
"""
value = value.replace('{{!}}', '|')
prop, options = self.fields[field]
@@ -418,7 +418,7 @@
*args) -> Generator[WbTime]:
"""Handle 'time' claim type.
- .. versionadded:: 7.5
+ .. version-added:: 7.5
"""
value = value.replace('{{!}}', '|')
value = value.replace(' ', ' ')
@@ -472,7 +472,7 @@
def handle_string(value: str, *args) -> Generator[str]:
"""Handle 'string' and 'external-id' claim type.
- .. versionadded:: 7.5
+ .. version-added:: 7.5
"""
yield value.strip()
@@ -481,7 +481,7 @@
def handle_url(self, value, *args) -> Generator[str]:
"""Handle 'url' claim type.
- .. versionadded:: 7.5
+ .. version-added:: 7.5
"""
for match in self.linkR.finditer(value):
yield match['url']
@@ -494,7 +494,7 @@
) -> Generator[pywikibot.FilePage]:
"""Handle 'commonsMedia' claim type.
- .. versionadded:: 7.5
+ .. version-added:: 7.5
"""
repo = site.image_repository()
image = pywikibot.FilePage(repo, value)
diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index 36d439a..c2757f6 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -350,7 +350,7 @@
``-start:!``, and if it takes so long that you have to break it off, use
``-continue`` next time.
-.. versionchanged:: 10.4
+.. version-changed:: 10.4
The ``-localonly`` option now restricts page processing to the
default site only, instead of the origin page.
"""
@@ -686,7 +686,7 @@
def is_not_redirect(page):
"""Check whether *page* is not a redirect page.
- .. versionadded:: 11.0
+ .. version-added:: 11.0
"""
return page.exists() and not (page.isRedirectPage()
or page.isCategoryRedirect())
diff --git a/scripts/interwikidata.py b/scripts/interwikidata.py
index d652276..cb6c3aa 100755
--- a/scripts/interwikidata.py
+++ b/scripts/interwikidata.py
@@ -59,7 +59,7 @@
"""The bot for interwiki.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
IWBot is a ConfigParserBot
"""
diff --git a/scripts/maintenance/__init__.py b/scripts/maintenance/__init__.py
index c67595d..17c09da 100644
--- a/scripts/maintenance/__init__.py
+++ b/scripts/maintenance/__init__.py
@@ -5,16 +5,16 @@
#
"""Maintenance scripts.
-.. versionremoved:: 3.0.20190430
+.. version-removed:: 3.0.20190430
``diff_checker`` script was removed (:phab:`T221462`).
-.. versionremoved:: 6.1
+.. version-removed:: 6.1
``compat2core`` script was removed.
-.. versionremoved:: 7.3
+.. version-removed:: 7.3
``update_linktrails`` script (:phab:`T89451`) and ``update_script``
script were removed.
-.. versionremoved:: 8.0
+.. version-removed:: 8.0
``sorting_order`` script was removed (:phab:`T325426`).
-.. versionremoved:: 9.0
+.. version-removed:: 9.0
``wikimedia_sites`` script was removed (:phab:`T78396`).
"""
from __future__ import annotations
diff --git a/scripts/maintenance/addwikis.py b/scripts/maintenance/addwikis.py
index 981c7b5..c21f888 100755
--- a/scripts/maintenance/addwikis.py
+++ b/scripts/maintenance/addwikis.py
@@ -19,12 +19,12 @@
and ``baz`` to wikisource.
-.. versionadded:: 9.2
-.. versionchanged:: 10.4
+.. version-added:: 9.2
+.. version-changed:: 10.4
The options ``-h``, ``-help`` and ``--help`` display the help message.
-.. deprecated:: 10.4
+.. version-deprecated:: 10.4
The ``help`` option
-.. versionchanged:: 11.0
+.. version-changed:: 11.0
Multiple families can be given with one run. The difference is shown
instead of the new list.
"""
diff --git a/scripts/maintenance/cache.py b/scripts/maintenance/cache.py
index 23c0876..40435cc 100755
--- a/scripts/maintenance/cache.py
+++ b/scripts/maintenance/cache.py
@@ -116,7 +116,7 @@
def _get_cache_dir(self) -> Path:
"""Directory of the cached entry.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
return a `pathlib.Path` object.
"""
return Path(self.directory)
@@ -124,7 +124,7 @@
def _cachefile_path(self) -> Path:
"""Return cache file path.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
return a `pathlib.Path` object.
"""
return self._get_cache_dir() / self._create_file_name()
@@ -229,7 +229,7 @@
check the filesystem mount options. You may need to remount with
'strictatime'.
- .. versionchanged:: 9.0
+ .. version-changed:: 9.0
default cache path to 'apicache' without Python main version.
:param use_accesstime: Whether access times should be used. `None`
diff --git a/scripts/maintenance/unidata.py b/scripts/maintenance/unidata.py
index de58b53..317cd1b 100755
--- a/scripts/maintenance/unidata.py
+++ b/scripts/maintenance/unidata.py
@@ -12,7 +12,7 @@
a superse of the older version and should be enough. But this is not
tested completely.
-.. versionadded:: 8.4
+.. version-added:: 8.4
"""
from __future__ import annotations
diff --git a/scripts/movepages.py b/scripts/movepages.py
index 6b3d342..7049b39 100755
--- a/scripts/movepages.py
+++ b/scripts/movepages.py
@@ -61,7 +61,7 @@
"""Page move bot.
- .. versionchanged:: 7.2
+ .. version-changed:: 7.2
`movesubpages` option was added
"""
diff --git a/scripts/noreferences.py b/scripts/noreferences.py
index aff4778..996d9cc 100755
--- a/scripts/noreferences.py
+++ b/scripts/noreferences.py
@@ -763,7 +763,7 @@
ident: str = '==') -> str:
"""Create a reference section and insert it into the given text.
- .. versionchanged:: 9.1
+ .. version-changed:: 9.1
raise :exc:`exceptions.TranslationError` if script is not
localized for the current site.
@@ -802,7 +802,7 @@
def treat_page(self) -> None:
"""Run the bot.
- .. versionchanged:: 9.1
+ .. version-changed:: 9.1
print error message and close :attr:`bot.BaseBot.generator`
if :exc:`exceptions.TranslationError` was raised.
"""
diff --git a/scripts/nowcommons.py b/scripts/nowcommons.py
index e1a3571..7e4fd0d 100755
--- a/scripts/nowcommons.py
+++ b/scripts/nowcommons.py
@@ -187,7 +187,7 @@
"""Bot to delete migrated files.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
NowCommonsDeleteBot is a ConfigParserBot
"""
diff --git a/scripts/pagefromfile.py b/scripts/pagefromfile.py
index 328e2b7..519b932 100755
--- a/scripts/pagefromfile.py
+++ b/scripts/pagefromfile.py
@@ -99,7 +99,7 @@
def __init__(self, offset: int, source: str | None = None) -> None:
"""Initializer.
- .. versionchanged:: 10.7
+ .. version-changed:: 10.7
*source* was added; a message was passed to Exception super
class.
"""
@@ -190,7 +190,7 @@
"""Generator class, responsible for reading the file.
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
subclassed from :class:`pywikibot.tools.collections.GeneratorWrapper`
"""
@@ -236,7 +236,7 @@
content is stored as a page attribute defined by CTX_ATTR.
- .. versionchanged:: 7.6
+ .. version-changed:: 7.6
changed from iterator method to generator property
"""
pywikibot.info(f"\n\nReading '{self.filename}'...")
diff --git a/scripts/protect.py b/scripts/protect.py
index 8c0a337..6e490d0 100755
--- a/scripts/protect.py
+++ b/scripts/protect.py
@@ -76,7 +76,7 @@
"""This bot allows protection of pages en masse.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
CheckerBot is a ConfigParserBot
"""
diff --git a/scripts/redirect.py b/scripts/redirect.py
index 04c3e87..599210c 100755
--- a/scripts/redirect.py
+++ b/scripts/redirect.py
@@ -26,7 +26,7 @@
deletion if there is no speedy deletion template
available.
- .. versionchanged:: 10.3
+ .. version-changed:: 10.3
only tries to fix if the namspace of the source page
is equal to the destination page.
@@ -238,7 +238,7 @@
) -> Generator[tuple[str, int | None, str, str | None]]:
r"""Return a generator that yields tuples of data about redirect Pages.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
only yield tuple if type of redirect is not 1 (normal redirect)
The description of returned tuple items is as follows:
diff --git a/scripts/reflinks.py b/scripts/reflinks.py
index 7ec9595..eeb1d79 100755
--- a/scripts/reflinks.py
+++ b/scripts/reflinks.py
@@ -424,7 +424,7 @@
"""References bot.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
ReferencesRobot is a ConfigParserBot
"""
diff --git a/scripts/replace.py b/scripts/replace.py
index 2115063..25b752d 100755
--- a/scripts/replace.py
+++ b/scripts/replace.py
@@ -694,7 +694,7 @@
def treat(self, page) -> None:
"""Work on each page retrieved from generator.
- .. versionchanged:: 10.1
+ .. version-changed:: 10.1
After the browser call, the script affects the possibly
changed text.
"""
@@ -813,14 +813,14 @@
}
"""Dictionary to convert exceptions command line options to exceptions keys.
-.. versionadded:: 7.0
+.. version-added:: 7.0
"""
def handle_exceptions(*args: str) -> tuple[list[str], dict[str, str]]:
"""Handle exceptions args to ignore pages which contain certain texts.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
"""
exceptions = {key: [] for key in EXC_KEYS.values()}
local_args = []
@@ -836,8 +836,8 @@
def handle_pairsfile(filename: str) -> list[str] | None:
"""Handle -pairsfile argument.
- .. versionadded:: 7.0
- .. versionchanged:: 9.2
+ .. version-added:: 7.0
+ .. version-changed:: 9.2
replacement patterns are printed it they are incomplete.
"""
if not filename:
@@ -865,7 +865,7 @@
def handle_manual() -> list[str]:
"""Handle manual input.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
"""
pairs = []
old = pywikibot.input('Please enter the text that should be replaced:')
@@ -883,7 +883,7 @@
exceptions: list[re.Pattern]) -> Generator:
"""Handle default sql query.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
"""
if not sql:
where_clause = 'WHERE ({})'.format(' OR '.join(
@@ -915,7 +915,7 @@
If args is an empty list, sys.argv is used.
- .. versionchanged:: 9.2
+ .. version-changed:: 9.2
replacement patterns are printed it they are incomplete.
:param args: command line arguments
diff --git a/scripts/revertbot.py b/scripts/revertbot.py
index 0982614..371d232 100755
--- a/scripts/revertbot.py
+++ b/scripts/revertbot.py
@@ -101,7 +101,7 @@
def local_timestamp(self, ts) -> str:
"""Convert Timestamp to a localized timestamp string.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
"""
year = formatYear(self.site.lang, ts.year)
date = format_date(ts.month, ts.day, self.site)
diff --git a/scripts/touch.py b/scripts/touch.py
index 4164898..5a494a9 100755
--- a/scripts/touch.py
+++ b/scripts/touch.py
@@ -88,7 +88,7 @@
def treat(self, page) -> None:
"""Purge the given page.
- .. versionchanged:: 8.0
+ .. version-changed:: 8.0
Enable batch purge using :meth:`APISite.purgepages()
<pywikibot.site._apisite.APISite.purgepages>`
"""
@@ -100,7 +100,7 @@
def teardown(self) -> None:
"""Purge remaining pages if no KeyboardInterrupt was made.
- .. versionadded:: 8.0
+ .. version-added:: 8.0
"""
if self.generator_completed:
with suppress(KeyboardInterrupt):
@@ -112,8 +112,8 @@
def purgepages(self, flush=False) -> None:
"""Purge a bulk of page if rate limit exceeded.
- .. versionadded:: 8.0
- .. versionchanged:: 9.0
+ .. version-added:: 8.0
+ .. version-changed:: 9.0
:meth:`site.APISite.ratelimit()
<pywikibot.site._apisite.APISite.ratelimit>` method is used
to determine bulk length and delay.
diff --git a/scripts/tracking_param_remover.py b/scripts/tracking_param_remover.py
index 623f1cd..6e1b99e 100755
--- a/scripts/tracking_param_remover.py
+++ b/scripts/tracking_param_remover.py
@@ -10,10 +10,10 @@
-always Don't prompt for each removal
-.. versionadded:: 10.3
+.. version-added:: 10.3
"""
#
-# (C) Pywikibot team, 2025
+# (C) Pywikibot team, 2025-2026
#
# Distributed under the terms of the MIT license.
#
diff --git a/scripts/transwikiimport.py b/scripts/transwikiimport.py
index 2265df5..cc8c347 100755
--- a/scripts/transwikiimport.py
+++ b/scripts/transwikiimport.py
@@ -140,7 +140,7 @@
page the appropriate flag on the account must be set, usually
administrator, transwiki importer or importer.
-.. versionadded:: 8.2
+.. version-added:: 8.2
"""
from __future__ import annotations
diff --git a/scripts/unlink.py b/scripts/unlink.py
index c18e6e5..03ef40c 100755
--- a/scripts/unlink.py
+++ b/scripts/unlink.py
@@ -25,11 +25,11 @@
python pwb.py unlink "Foo bar" -namespace:0 -namespace:6
-.. versionchanged:: 6.0
+.. version-changed:: 6.0
script was archived.
-.. versionchanged:: 7.0
+.. version-changed:: 7.0
script was deleted.
-.. versionchanged:: 9.4
+.. version-changed:: 9.4
script was recovered.
"""
from __future__ import annotations
diff --git a/scripts/unusedfiles.py b/scripts/unusedfiles.py
index 0dd6568..910f8e5 100755
--- a/scripts/unusedfiles.py
+++ b/scripts/unusedfiles.py
@@ -76,7 +76,7 @@
"""Unused files bot.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
UnusedFilesBot is a ConfigParserBot
"""
diff --git a/scripts/watchlist.py b/scripts/watchlist.py
index 54badd9..2b8394b 100755
--- a/scripts/watchlist.py
+++ b/scripts/watchlist.py
@@ -26,7 +26,7 @@
-new Load watchlists for all wikis where accounts is set in user
config file
-.. versionchanged:: 7.7
+.. version-changed:: 7.7
watchlist is retrieved in parallel tasks.
"""
from __future__ import annotations
diff --git a/scripts/welcome.py b/scripts/welcome.py
index 470a1ec..f91d892 100755
--- a/scripts/welcome.py
+++ b/scripts/welcome.py
@@ -496,7 +496,7 @@
def get_welcome_text(site: pywikibot.site.BaseSite, *, sign: str = '') -> str:
"""Return the fully composed welcome text for the given site.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
*sign* parameteer was added, return the fully composed welcome text.
:param site: The target site where the script is running.
@@ -783,7 +783,7 @@
def define_sign(self) -> list[str]:
"""Setup signature.
- .. versionchanged:: 11.0
+ .. version-changed:: 11.0
The unused *force* parameter was removed.
"""
sign_text = ''
@@ -828,7 +828,7 @@
def skip_page(self, user) -> bool:
"""Check whether the user is to be skipped.
- .. versionchanged:: 7.0
+ .. version-changed:: 7.0
also skip if user is locked globally
"""
if user.is_blocked() or user.is_locked():
diff --git a/setup.py b/setup.py
index f90c198..9d99b11c 100755
--- a/setup.py
+++ b/setup.py
@@ -100,7 +100,7 @@
``configparser`` is used. Therefore the tomlfile must be readable as
config file until the first comment.
- .. versionadded:: 9.0
+ .. version-added:: 9.0
"""
if sys.version_info >= (3, 11):
import tomllib
diff --git a/tests/README.rst b/tests/README.rst
index b58d311..6d215b9 100644
--- a/tests/README.rst
+++ b/tests/README.rst
@@ -136,7 +136,7 @@
write operations successfully. These **will** write to the wikis, and they
should always only write to 'test' wikis.
- .. versionchanged:: 9.2
+ .. version-changed:: 9.2
Enabling them will also enable 'edit failure' tests which attempt to write
to the wikis and **should** fail. If there is a bug in pywikibot or
MediaWiki, these tests **may** actually perform a write operation.
@@ -145,10 +145,10 @@
PYWIKIBOT_TEST_WRITE=1
-.. versionremoved:: 9.2
+.. version-removed:: 9.2
The :envvar:`PYWIKIBOT_TEST_WRITE_FAIL` environment variable; use
:envvar:`PYWIKIBOT_TEST_WRITE` instead.
-.. versionremoved:: 9.5
+.. version-removed:: 9.5
The :envvar:`PYWIKIBOT_TEST_GUI` environment variable.
Instead of setting the environment by the os (or `os.environ` as well) you can use the :mod:`pwb`
diff --git a/tests/aspects.py b/tests/aspects.py
index e422af2..965826b 100644
--- a/tests/aspects.py
+++ b/tests/aspects.py
@@ -73,7 +73,7 @@
The mixin will be removed without deprecation period once Python 3.14
becomes the minimum requirement for Pywikibot, likely with Pywikibot 16.
- .. versionadded:: 10.3
+ .. version-added:: 10.3
"""
def assertStartsWith(self, s: str, prefix: str,
@@ -292,7 +292,7 @@
) -> list[pywikibot.Page]:
"""Get pages from gen, asserting they are Page from site.
- .. versionchanged:: 9.3
+ .. version-changed:: 9.3
the *count* parameter was dropped; all pages from *gen* are
tested.
@@ -339,7 +339,7 @@
skip: bool = False) -> None:
"""Try to confirm that generator returns Pages for all namespaces.
- .. versionchanged:: 9.3
+ .. version-changed:: 9.3
raises TypeError instead of AssertionError
:param gen: generator to iterate
@@ -453,9 +453,9 @@
only supported for the current site — not for related sites like
data or image repositories.
- .. versionadded:: 8.0
+ .. version-added:: 8.0
- .. versionchanged:: 10.0
+ .. version-changed:: 10.0
TypeError and ValueError are used for validation fails.
*version_needed* parameter is positional only.
@@ -679,7 +679,7 @@
The test class is skipped unless environment variable
:envvar:`PYWIKIBOT_TEST_WRITE` is set to 1.
- .. versionchanged:: 9.2
+ .. version-changed:: 9.2
:envvar:`PYWIKIBOT_TEST_WRITE_FAIL` environment variable was
discarded, see :ref:`Environment variables`.
@@ -765,7 +765,7 @@
There may be many sites, and setUp doesn't know which site is to
be tested; ensure they are all logged in.
- .. versionadded:: 7.0
+ .. version-added:: 7.0
The `skip_if_login_fails` parameter.
:param skip_if_login_fails: called with setUp(); if True, skip
@@ -832,7 +832,7 @@
def __new__(cls, name, bases, dct):
"""Create the new class.
- .. versionchanged:: 9.3
+ .. version-changed:: 9.3
raises AttributeError instead of AssertionError for
duplicated hostname, raises Exception instead of
AssertionError for missing or wrong "net" attribute with
@@ -1034,7 +1034,7 @@
def add_method(dct, test_name, method, doc=None, doc_suffix=None) -> None:
"""Set method's __name__ and __doc__ and add it to dct.
- .. versionchanged:: 9.3
+ .. version-changed:: 9.3
raises ValueError instead of AssertionError
:raises ValueError: doc string must end with a period.
@@ -1115,7 +1115,7 @@
def get_site(cls, name=None):
"""Return the prefetched Site object.
- .. versionchanged:: 9.3
+ .. version-changed:: 9.3
raises Exception instead of AssertionError for site mismatch
:raises Exception: method called for multiple sites without
@@ -1338,7 +1338,7 @@
Check that the default site is a Wikimedia site.
Use en.wikipedia.org as a fallback.
- .. versionchanged:: 9.3
+ .. version-changed:: 9.3
raises Exception instead of AssertionError
:raises Exception: "site" or "sites" attribute is missing or
@@ -1498,7 +1498,7 @@
def execute(self, args: list[str], **kwargs):
"""Run :func:`tests.utils.execute_pwb` with default site.
- .. versionchanged:: 9.1
+ .. version-changed:: 9.1
pass all arguments to :func:`tests.utils.execute_pwb`; make
this method public.
@@ -1583,7 +1583,7 @@
instead: str | bool | None) -> Any:
"""Build a deprecation warning result.
- .. versionchanged:: 9.3
+ .. version-changed:: 9.3
raises TypeError instead of AssertionError
:raises TypeError: invalid *instead* type
diff --git a/tests/basepage.py b/tests/basepage.py
index 24c5ff4..3b4f05f 100644
--- a/tests/basepage.py
+++ b/tests/basepage.py
@@ -16,7 +16,7 @@
"""Enable abstract methods in TestCase-based base classes.
- .. versionadded:: 10.3
+ .. version-added:: 10.3
"""
@@ -38,7 +38,7 @@
def setup_page(self) -> None:
"""Subclasses must implement this to assign self._page.
- .. versionadded:: 10.3
+ .. version-added:: 10.3
"""
diff --git a/tests/gui_tests.py b/tests/gui_tests.py
index 24d235d..33331be 100755
--- a/tests/gui_tests.py
+++ b/tests/gui_tests.py
@@ -61,10 +61,10 @@
def setUpModule() -> None:
"""Skip tests if tkinter or PIL is not installed.
- .. versionchanged:: 7.7
+ .. version-changed:: 7.7
skip test if ``PYWIKIBOT_TEST_GUI`` environment variable is not
set.
- .. versionchanged:: 9.5
+ .. version-changed:: 9.5
:envvar:`PYWIKIBOT_TEST_GUI` environment variable was removed.
``pytest`` with ``pytest-xvfb `` extension is required for this
tests on github actions.
diff --git a/tests/hooks/__init__.py b/tests/hooks/__init__.py
index d179e01..763a6b0 100644
--- a/tests/hooks/__init__.py
+++ b/tests/hooks/__init__.py
@@ -5,6 +5,6 @@
#
"""Local pre-commit hooks for CI tests.
-.. versionadded:: 10.3
+.. version-added:: 10.3
"""
from __future__ import annotations
diff --git a/tests/hooks/copyright_fixer.py b/tests/hooks/copyright_fixer.py
index e39fc40..02c4444 100755
--- a/tests/hooks/copyright_fixer.py
+++ b/tests/hooks/copyright_fixer.py
@@ -6,7 +6,7 @@
#
"""Pre-commit hook to set the leftmost copyright year.
-.. versionadded:: 10.3
+.. version-added:: 10.3
"""
from __future__ import annotations
diff --git a/tests/pwb/print_argv.py b/tests/pwb/print_argv.py
index 78690ad..1004382 100755
--- a/tests/pwb/print_argv.py
+++ b/tests/pwb/print_argv.py
@@ -6,7 +6,7 @@
#
"""Script that forms part of pwb_tests.
-.. versionadded:: 7.0
+.. version-added:: 7.0
"""
from __future__ import annotations
diff --git a/tests/superset_tests.py b/tests/superset_tests.py
index aaafb70..a744b1a 100755
--- a/tests/superset_tests.py
+++ b/tests/superset_tests.py
@@ -6,7 +6,7 @@
#
"""Tests for superset module.
-.. versionadded:: 9.2
+.. version-added:: 9.2
"""
from __future__ import annotations
diff --git a/tests/utils.py b/tests/utils.py
index 318740d..db4d7eb 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -292,7 +292,7 @@
def is_cached(self, key: str) -> bool:
"""Return whether the key is cached.
- .. versionadded:: 8.3
+ .. version-added:: 8.3
"""
return key in self._cache
@@ -416,7 +416,7 @@
def login(self, *args, cookie_only=False, **kwargs) -> None:
"""Overwrite login which is called when a site is initialized.
- .. versionadded:: 8.0.4
+ .. version-added:: 8.0.4
"""
if cookie_only:
return
@@ -467,9 +467,9 @@
def execute(command: list[str], *, data_in=None, timeout=None):
"""Execute a command and capture outputs.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
*error* parameter was removed.
- .. versionchanged:: 9.1
+ .. version-changed:: 9.1
parameters except *command* are keyword only.
:param command: executable to run and arguments to use
@@ -518,11 +518,11 @@
overrides: dict[str, str] | None = None) -> dict[str, Any]:
"""Execute the pwb.py script and capture outputs.
- .. versionchanged:: 8.2
+ .. version-changed:: 8.2
the *error* parameter was removed.
- .. versionchanged:: 9.1
+ .. version-changed:: 9.1
parameters except *args* are keyword only.
- .. versionchanged:: 10.4
+ .. version-changed:: 10.4
coverage is used if running github actions and a temporary file
is used for overrides.
@@ -612,8 +612,8 @@
.. note:: The last sample uses Python 3.10 syntax.
- .. versionadded:: 6.2
- .. versionchanged:: 9.3
+ .. version-added:: 6.2
+ .. version-changed:: 9.3
*code* parameter was added
:param exceptions: Exceptions to let test skip
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1251265?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: I16795c27669e9b977110b1cff8dabeef16bf0c9d
Gerrit-Change-Number: 1251265
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1251221?usp=email )
Change subject: doc: Refer to Version compatibility instead of outdated MW page
......................................................................
doc: Refer to Version compatibility instead of outdated MW page
Bug: T419939
Change-Id: I7be320d56ef96c6b8d3ed3ef4360513455bb3ea2
---
M docs/index.rst
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/docs/index.rst b/docs/index.rst
index 9083e42..fc4ee58 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -13,7 +13,7 @@
It features full API usage and is up-to-date with new MediaWiki features and
a Pythonic package layout. But it also works with older installations of
MediaWiki 1.31 or higher. For older MediaWiki versions you have to use older
-Pywikibot releases; refer :manpage:`Compatibility`.
+Pywikibot releases; refer :ref:`Version compatibility`.
Pywikibot supports Microsoft Windows, macOS and Linux when used with a
compatible version of Python. It should also work on any other operating
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1251221?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: I7be320d56ef96c6b8d3ed3ef4360513455bb3ea2
Gerrit-Change-Number: 1251221
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/i18n/+/1251156?usp=email )
Change subject: I18N: Add edit summare when the bot deletes a redirect to a deleted page
......................................................................
I18N: Add edit summare when the bot deletes a redirect to a deleted page
Bug: T419672
Change-Id: If722970f93e14b15f38b1bd4c648e46620aac5af
---
M delete/en.json
M delete/qqq.json
2 files changed, 2 insertions(+), 0 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/delete/en.json b/delete/en.json
index 4dcc61e..8cdefbb 100644
--- a/delete/en.json
+++ b/delete/en.json
@@ -6,6 +6,7 @@
"Xqt"
]
},
+ "delete-broken-redirect": "Bot: Delete redirect to deleted page %(page)s",
"delete-from-category": "Bot: Deleting all pages from category %(page)s",
"delete-from-file": "Bot: Deleting a list of pages.",
"delete-images": "Bot: Deleting all images on page %(page)s",
diff --git a/delete/qqq.json b/delete/qqq.json
index 03cce13..64d6802 100644
--- a/delete/qqq.json
+++ b/delete/qqq.json
@@ -6,6 +6,7 @@
"Xqt"
]
},
+ "delete-broken-redirect": "Edit summary when the bot deletes a redirect to a deleted page.",
"delete-from-category": "Used as edit summary. Parameters:\n* %(page)s - category name\nSee also:\n* {{msg-pywikibot|Protect-category}}",
"delete-from-file": "Edit summary when the bot deletes a list of pages.",
"delete-images": "Used as edit summary. Parameters:\n* %(page)s - page name\nSee also:\n* {{msg-pywikibot|Protect-images}}",
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/i18n/+/1251156?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/i18n
Gerrit-Branch: master
Gerrit-Change-Id: If722970f93e14b15f38b1bd4c648e46620aac5af
Gerrit-Change-Number: 1251156
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot