jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/i18n/+/1155360?usp=email )
Change subject: tests: Remove l10n_tests but keep test infrastructure in i18n submodule
......................................................................
tests: Remove l10n_tests but keep test infrastructure in i18n submodule
redirect-broken-redirect-template and archivebot-archiveheader are to
be removed. It is no longer necessary to test these templates before
merging message changes.
Bug: T396399
Bug: T396447
Change-Id: I97cc30ffcd32744f5287b8294104937261f59adb
---
M run-tests.sh
M tox.ini
2 files changed, 3 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/run-tests.sh b/run-tests.sh
index edaf9ae..8a13db3 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -15,4 +15,5 @@
# T349599: setenv is not respected in tox;
# therefore set this environment variable here
export PYWIKIBOT_NO_USER_CONFIG=2
-python -m unittest -v tests/l10n_tests.py
+# no tests jet
+# python -m unittest -v tests/l10n_tests.py
diff --git a/tox.ini b/tox.ini
index 403d987..adc535c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -15,5 +15,5 @@
deps =
packaging
requests
- wikitextparser
+
allowlist_externals = *
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/i18n/+/1155360?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: I97cc30ffcd32744f5287b8294104937261f59adb
Gerrit-Change-Number: 1155360
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/core/+/1157526?usp=email )
Change subject: [10.3] Prepare next release
......................................................................
[10.3] Prepare next release
Change-Id: Ie945fc6930289de88b3c72c30b9a7da530dad774
---
M HISTORY.rst
M ROADMAP.rst
M pywikibot/__metadata__.py
M pywikibot/page/_toolforge.py
M scripts/__init__.py
M scripts/pyproject.toml
6 files changed, 29 insertions(+), 16 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/HISTORY.rst b/HISTORY.rst
index ac36765..3b45a1d 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,6 +1,24 @@
Release History
===============
+10.2.0
+------
+*14 June 2025*
+
+* Use Lock object in :class:`comms.http.PywikibotCookieJar` for thread-safe saving (:phab:`T396309`)
+* Raise TypeError instead of ValueError in :func:`i18n.translate` if *parameter* is not a mapping
+* Recognise wildcard in :mod:`config.usernames<config>` when running
+ :mod:`login<pywikibot.scripts.login>` script (:phab:`T110411`)
+* Search for http and https by default in :meth:`Site.exturlusage()
+ <.site._generators.GeneratorsMixin.exturlusage>` (:phab:`T396280`)
+* Add login methods overview to :mod:`login` module (:phab:`T396204`)
+* Enable EmailAuth with :class:`login.ClientLoginManager` (:phab:`T395703`)
+* Move :mod:`tools.threading.RLock<tools.threading>` to :mod:`backports` module (:phab:`T395182`)
+* Only show the description passed to :class:`specialbots.UploadRobot` if it is to be verified (:phab:`T394895`)
+* i18n updates
+* Add support for Python 3.15 (:phab:`T395177`)
+
+
10.1.0
------
*18 May 2025*
diff --git a/ROADMAP.rst b/ROADMAP.rst
index c752dd9..f982227 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -1,22 +1,17 @@
Current Release Changes
=======================
-* Use Lock object in :class:`comms.http.PywikibotCookieJar` for thread-safe saving (:phab:`T396309`)
-* Raise TypeError instead of ValueError in :func:`i18n.translate` if *parameter* is not a mapping
-* Recognise wildcard in :mod:`config.usernames<config>` when running
- :mod:`login<pywikibot.scripts.login>` script (:phab:`T110411`)
-* Search for http and https by default in :meth:`Site.exturlusage()
- <.site._generators.GeneratorsMixin.exturlusage>` (:phab:`T396280`)
-* Add login methods overview to :mod:`login` module (:phab:`T396204`)
-* Enable EmailAuth with :class:`login.ClientLoginManager` (:phab:`T395703`)
-* Move :mod:`tools.threading.RLock<tools.threading>` to :mod:`backports` module (:phab:`T395182`)
-* Only show the description passed to :class:`specialbots.UploadRobot` if it is to be verified (:phab:`T394895`)
-* Add support for Python 3.15 (:phab:`T395177`)
-
+* (no changes yet)
Current Deprecations
====================
+* 10.2.0: :mod:`tools.threading.RLock<tools.threading>` is deprecated and moved to :mod:`backports`
+ module. The :meth:`backports.RLock.count` method is also deprecated. For Python 3.14+ use ``RLock``
+ from Python library ``threading`` instead. (:phab:`T395182`)
+* 10.1.0: *revid* and *date* parameters of :meth:`Page.authorship()
+ <page._toolforge.WikiBlameMixin.authorship>` were dropped
+* 10.0.0: *last_id* of :class:`comms.eventstreams.EventStreams` was renamed to *last_event_id* (:phab:`T309380`)
* 10.0.0: 'millenia' argument for *precision* parameter of :class:`pywikibot.WbTime` is deprecated;
'millennium' must be used instead.
* 10.0.0: *includeredirects* parameter of :func:`pagegenerators.AllpagesPageGenerator` and
diff --git a/pywikibot/__metadata__.py b/pywikibot/__metadata__.py
index 845ae49..4e9889b 100644
--- a/pywikibot/__metadata__.py
+++ b/pywikibot/__metadata__.py
@@ -12,6 +12,6 @@
from time import strftime
-__version__ = '10.2.0'
+__version__ = '10.3.0.dev0'
__url__ = 'https://www.mediawiki.org/wiki/Manual:Pywikibot'
__copyright__ = f'2003-{strftime("%Y")}, Pywikibot team'
diff --git a/pywikibot/page/_toolforge.py b/pywikibot/page/_toolforge.py
index eb691f2..e6c5820 100644
--- a/pywikibot/page/_toolforge.py
+++ b/pywikibot/page/_toolforge.py
@@ -73,7 +73,7 @@
return collections.Counter(
{user: int(cnt) for user, (_, cnt) in self.authorship(5).items()})
- @remove_last_args(['revid', 'date']) # since 10.1
+ @remove_last_args(['revid', 'date']) # since 10.1.0
def authorship(
self,
n: int | None = None,
diff --git a/scripts/__init__.py b/scripts/__init__.py
index 729a82f..44bc808 100644
--- a/scripts/__init__.py
+++ b/scripts/__init__.py
@@ -34,7 +34,7 @@
from pathlib import Path
-__version__ = '10.2.0'
+__version__ = '10.3.0'
#: defines the entry point for pywikibot-scripts package
base_dir = Path(__file__).parent
diff --git a/scripts/pyproject.toml b/scripts/pyproject.toml
index f31b745..f2d70b8 100644
--- a/scripts/pyproject.toml
+++ b/scripts/pyproject.toml
@@ -7,7 +7,7 @@
[project]
name = "pywikibot-scripts"
-version = "10.2.0"
+version = "10.3.0"
authors = [
{name = "xqt", email = "info(a)gno.de"},
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1157526?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: Ie945fc6930289de88b3c72c30b9a7da530dad774
Gerrit-Change-Number: 1157526
Gerrit-PatchSet: 2
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/core/+/1154396?usp=email )
Change subject: IMPR: raise TypeError instead of ValueError if parameter is not a mapping
......................................................................
IMPR: raise TypeError instead of ValueError if parameter is not a mapping
Also update documentaiton.
Change-Id: I8e7af3de76aa51c58b9540aece2500a3af7d6c05
---
M pywikibot/i18n.py
1 file changed, 17 insertions(+), 7 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/i18n.py b/pywikibot/i18n.py
index 2b461cb..a045df0 100644
--- a/pywikibot/i18n.py
+++ b/pywikibot/i18n.py
@@ -560,16 +560,25 @@
"""Return the most appropriate localization from a localization dict.
Given a site code and a dictionary, returns the dictionary's value
- for key 'code' if this key exists; otherwise tries to return a value
+ for key *code* if this key exists; otherwise tries to return a value
for an alternative code that is most applicable to use on the wiki
- in language 'code' except fallback is False.
+ in language *code* except fallback is False.
- The code itself is always checked first, then these codes that have
+ The *code* itself is always checked first, then these codes that have
been defined to be alternatives, and finally English.
- If fallback is False and the code is not found in the
+ If *fallback* is False and the code is not found in the *xdict*,
+ None is returned.
- For PLURAL support have a look at the twtranslate method.
+ For PLURAL support have a look at the :func:`twtranslate` function.
+
+ .. versionchanged:: 2.0
+ *parameter* other than a mapping (or None) is deprecated.
+ .. versionchanged:: 6.2
+ ValueError is raised if *parameter* is not a mapping.
+ .. versionchanged:: 10.2
+ TypeError instead of ValueError is raised if *parameter* is not a
+ mapping.
:param code: The site code as string or Site object. If xdict is an
extended dictionary the Site object should be used in favour of
@@ -586,9 +595,10 @@
:raise IndexError: If the language supports and requires more
plurals than defined for the given PLURAL pattern.
:raise KeyError: No fallback key found if fallback is not False
+ :raise TypeError: *parameter* is not a mapping
"""
family = pywikibot.config.family
- # If a site is given instead of a code, use its language
+ # If a site is given instead of a code, use its code
if hasattr(code, 'code'):
family = code.family.name
code = code.code
@@ -636,7 +646,7 @@
return trans
if not isinstance(parameters, Mapping):
- raise ValueError(
+ raise TypeError(
f'parameters should be a mapping, not {type(parameters).__name__}'
)
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1154396?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: I8e7af3de76aa51c58b9540aece2500a3af7d6c05
Gerrit-Change-Number: 1154396
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot