Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1235351?usp=email )
Change subject: archivebot: make TimeStripper more resilient for itwiki
......................................................................
archivebot: make TimeStripper more resilient for itwiki
Bug: T415880
Change-Id: I585c914c283a2d267d317150c75ba39d223c2068
---
M pywikibot/textlib.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Xqt: Verified; Looks good to me, approved
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index 5e08c36..48b0ab6 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -2235,8 +2235,8 @@
self.origNames2monthNum = {}
# use first_lower/first_upper for those language where month names
- # were changed: T324310, T356175
- if self.site.lang in ('hy', 'vi'):
+ # were changed: T324310, T356175, T415880
+ if self.site.lang in ('hy', 'it', 'vi'):
functions = [first_upper, first_lower]
else:
functions = [str]
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1235351?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: I585c914c283a2d267d317150c75ba39d223c2068
Gerrit-Change-Number: 1235351
Gerrit-PatchSet: 1
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/+/1235350?usp=email )
Change subject: Revert "archivebot: make TimeStripper more resilient for itwiki"
......................................................................
Revert "archivebot: make TimeStripper more resilient for itwiki"
This reverts commit e3e88edbcd65d4e8e2da5fce2a13552b709feb92.
Reason for revert: should only be changed on master branch
Change-Id: I988ae2700b86e604c6a850d5f108d7c0eb6c2bc7
---
M pywikibot/textlib.py
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Xqt: Verified; Looks good to me, approved
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index beb5bdc..97ea55a 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -1,6 +1,6 @@
"""Functions for manipulating wiki-text."""
#
-# (C) Pywikibot team, 2008-2026
+# (C) Pywikibot team, 2008-2025
#
# Distributed under the terms of the MIT license.
#
@@ -2234,8 +2234,8 @@
self.origNames2monthNum = {}
# use first_lower/first_upper for those language where month names
- # were changed: T324310, T356175, T415880
- if self.site.lang in ('hy', 'it', 'vi'):
+ # were changed: T324310, T356175
+ if self.site.lang in ('hy', 'vi'):
functions = [first_upper, first_lower]
else:
functions = [str]
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1235350?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: stable
Gerrit-Change-Id: I988ae2700b86e604c6a850d5f108d7c0eb6c2bc7
Gerrit-Change-Number: 1235350
Gerrit-PatchSet: 1
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/+/1235233?usp=email )
Change subject: tests: still more time required for windows tests after get throttle
......................................................................
tests: still more time required for windows tests after get throttle
Change-Id: I3e6646627c0f535128664cc30c5ad97eb92b721d
Signed-off-by: Xqt <info(a)gno.de>
---
M .github/workflows/windows_tests.yml
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Xqt: Verified; Looks good to me, approved
diff --git a/.github/workflows/windows_tests.yml b/.github/workflows/windows_tests.yml
index 549d549..af5916e 100644
--- a/.github/workflows/windows_tests.yml
+++ b/.github/workflows/windows_tests.yml
@@ -18,7 +18,7 @@
build:
runs-on: windows-latest
continue-on-error: ${{ matrix.experimental || false }}
- timeout-minutes: 75
+ timeout-minutes: 120
strategy:
fail-fast: false
matrix:
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1235233?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: I3e6646627c0f535128664cc30c5ad97eb92b721d
Gerrit-Change-Number: 1235233
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1234930?usp=email )
Change subject: sphinx: Use Sphinx 8.2.3 for documentation
......................................................................
sphinx: Use Sphinx 8.2.3 for documentation
Sphinx 9 breaks the documentation and several files are missing.
Bug: T413563
Change-Id: Ia0cbcd52b12c1dc969c17b5f4ca54a06bf5951c4
---
M docs/requirements.txt
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Xqt: Verified; Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/requirements.txt b/docs/requirements.txt
index 40ec37e..95cf7ea 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -1,7 +1,7 @@
# This is a PIP requirements file for building Sphinx documentation of Pywikibot
# ../requirements.txt is also needed.
-# Note: Python 3.11 is required for sphinx 8.2
-sphinx >= 8.2.3
+# Note: Python 3.11 is required for sphinx 8.2+
+sphinx == 8.2.3
rstcheck >=6.2.5
sphinxext-opengraph >= 0.13.0
sphinx-copybutton >= 0.5.2
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1234930?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: stable
Gerrit-Change-Id: Ia0cbcd52b12c1dc969c17b5f4ca54a06bf5951c4
Gerrit-Change-Number: 1234930
Gerrit-PatchSet: 1
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/+/1234434?usp=email )
Change subject: Revert "IMPR: Use singledispatchmethod with SiteLinkCollection.normalizeData"
......................................................................
Revert "IMPR: Use singledispatchmethod with SiteLinkCollection.normalizeData"
This reverts commit f74c5ff04b71716658d34a0708c4b1c7756bce86.
Reason for revert: There is a bug upstream in Python 3.9:
https://github.com/python/cpython/issues/83860
This was fixed in 3.10 and probably in 3.9.8+
Change-Id: I289faf6818d5c5bb525d5a1f448eb7d942ff0e08
---
M pywikibot/page/_collections.py
1 file changed, 21 insertions(+), 36 deletions(-)
Approvals:
Xqt: Verified; Looks good to me, approved
diff --git a/pywikibot/page/_collections.py b/pywikibot/page/_collections.py
index a4ea78e..b95b059 100644
--- a/pywikibot/page/_collections.py
+++ b/pywikibot/page/_collections.py
@@ -9,7 +9,6 @@
import reprlib
from collections import defaultdict
from collections.abc import MutableMapping, MutableSequence
-from functools import singledispatchmethod
from typing import Any
import pywikibot
@@ -417,48 +416,34 @@
return {'site': db_name, 'title': obj.title()}
return obj
- @singledispatchmethod
@classmethod
- def normalizeData(cls, data) -> dict:
+ def normalizeData(cls, data: list | dict[str, Any]) -> dict:
"""Helper function to expand data into the Wikibase API structure.
:param data: Data to normalize
- :type data: dict | list
:return: The dict with normalized data
- :raises ValueError: Couldn't determine the site and title or the
- key doesn't match the site within *data* collection.
- :raises TypeError: Unsupported type for *data*
"""
- raise TypeError(f'Unsupported type: {type(data)}')
-
- @normalizeData.register
- @classmethod
- def _(cls, data: dict) -> dict:
norm_data = {}
- for key, obj in data.items():
- key = cls.getdbName(key)
- json = cls._extract_json(obj)
- if isinstance(json, str):
- json = {'site': key, 'title': json}
- elif key != json['site']:
- raise ValueError(
- "Key '{}' doesn't match the site of the value: '{}'"
- .format(key, json['site']))
- norm_data[key] = json
- return norm_data
-
- @normalizeData.register
- @classmethod
- def _(cls, data: list) -> dict:
- norm_data = {}
- for obj in data:
- json = cls._extract_json(obj)
- if not isinstance(json, dict):
- raise ValueError(
- "Couldn't determine the site and title of the value: "
- f'{json!r}')
- db_name = json['site']
- norm_data[db_name] = json
+ if isinstance(data, dict):
+ for key, obj in data.items():
+ key = cls.getdbName(key)
+ json = cls._extract_json(obj)
+ if isinstance(json, str):
+ json = {'site': key, 'title': json}
+ elif key != json['site']:
+ raise ValueError(
+ "Key '{}' doesn't match the site of the value: '{}'"
+ .format(key, json['site']))
+ norm_data[key] = json
+ else:
+ for obj in data:
+ json = cls._extract_json(obj)
+ if not isinstance(json, dict):
+ raise ValueError(
+ "Couldn't determine the site and title of the value: "
+ f'{json!r}')
+ db_name = json['site']
+ norm_data[db_name] = json
return norm_data
def toJSON(self, diffto: dict | None = None) -> dict:
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1234434?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: I289faf6818d5c5bb525d5a1f448eb7d942ff0e08
Gerrit-Change-Number: 1234434
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot