jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/709213 )
Change subject: [bugfix] Use collections.abc.Mapping for MonthNames class
......................................................................
[bugfix] Use collections.abc.Mapping for MonthNames class
typing.Mapping has not items() method in Python 3.5.0
Change-Id: I7929b09169f15203dd84da872d9aaee4a151ccd1
---
M pywikibot/date.py
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/date.py b/pywikibot/date.py
index bd82a7d..bdc1830 100644
--- a/pywikibot/date.py
+++ b/pywikibot/date.py
@@ -7,8 +7,8 @@
import calendar
import datetime
import re
-from collections import defaultdict
-from collections.abc import MutableMapping
+
+from collections import abc, defaultdict
from contextlib import suppress
from functools import singledispatch
from string import digits as _decimalDigits # noqa: N812
@@ -553,7 +553,7 @@
# This is useful when trying to decide if a certain article is a localized date
# or not, or generating dates.
# See dh() for additional information.
-class MonthNames(Mapping[str, Callable[[int], str]]):
+class MonthNames(abc.Mapping):
"""A Mapping which reads month names from MediaWiki
messages."""
@@ -590,7 +590,7 @@
return len(self.months)
-class MonthFormat(MutableMapping): # type: ignore[type-arg]
+class MonthFormat(abc.MutableMapping): # type: ignore[type-arg]
"""A Mapping which creates months formats."""
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/709213
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I7929b09169f15203dd84da872d9aaee4a151ccd1
Gerrit-Change-Number: 709213
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Damian <atagar1(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged