jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/994748?usp=email )
Change subject: [tests] test that https://wikimediafoundation.org/$1 is not a wiki
......................................................................
[tests] test that https://wikimediafoundation.org/$1 is not a wiki
Bug: T356013
Change-Id: I0307691ee34dad5e1c2b7a128ed6b759658fb70a
---
M tests/site_detect_tests.py
1 file changed, 13 insertions(+), 0 deletions(-)
Approvals:
DannyS712: Looks good to me, approved
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/site_detect_tests.py b/tests/site_detect_tests.py
index 1cafd2c..0f703ff 100755
--- a/tests/site_detect_tests.py
+++ b/tests/site_detect_tests.py
@@ -91,6 +91,9 @@
'http://www.merriam-webster.com/'
'cgi-bin/dictionary?book=Dictionary&va=$1',
'http://arxiv.org/abs/$1',
+ # looks like a MW site but isn't, api is redirected to
+ # https://foundation.wikimedia.org
+ 'https://wikimediafoundation.org/$1',
)
failing_sites = [
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/994748?usp=email
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: I0307691ee34dad5e1c2b7a128ed6b759658fb70a
Gerrit-Change-Number: 994748
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: DannyS712 <dannys712.wiki(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/994684?usp=email )
Change subject: [doc] Notice deprecated old color format
......................................................................
[doc] Notice deprecated old color format
Change-Id: I87c61a08a696b7330ddc9f5464322f19469a15fe
---
M ROADMAP.rst
1 file changed, 10 insertions(+), 0 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/ROADMAP.rst b/ROADMAP.rst
index 47f1e2d..9b450fd 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -119,6 +119,7 @@
* 7.6.0: :mod:`tools.collections` datatypes should no longer imported from :mod:`tools`
* 7.5.0: :mod:`textlib`.tzoneFixedOffset class will be removed in favour of :class:`time.TZoneFixedOffset`
* 7.4.0: ``FilePage.usingPages()`` was renamed to :meth:`using_pages()<pywikibot.FilePage.using_pages>`
+* 7.3.0: Old color escape sequences like ``\03{color}`` is deprecated in favour of new color format like <<color>>
* 7.3.0: ``linkitrail`` method of :class:`family.Family` is deprecated; use :meth:`APISite.linktrail()
<pywikibot.site._apisite.APISite.linktrail>` instead
* 7.2.0: ``tb`` parameter of :func:`exception()<pywikibot.exception>` function was renamed to ``exc_info``
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/994684?usp=email
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: I87c61a08a696b7330ddc9f5464322f19469a15fe
Gerrit-Change-Number: 994684
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/994675?usp=email )
Change subject: [doc] Add Family attribute hints to sphinx doc.
......................................................................
[doc] Add Family attribute hints to sphinx doc.
Change-Id: I8bc1a19fc6c451cbb57c97124d8ef9f10cf3afe8
---
M ROADMAP.rst
M pywikibot/family.py
2 files changed, 111 insertions(+), 70 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/ROADMAP.rst b/ROADMAP.rst
index 65f3950..47f1e2d 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -119,6 +119,8 @@
* 7.6.0: :mod:`tools.collections` datatypes should no longer imported from :mod:`tools`
* 7.5.0: :mod:`textlib`.tzoneFixedOffset class will be removed in favour of :class:`time.TZoneFixedOffset`
* 7.4.0: ``FilePage.usingPages()`` was renamed to :meth:`using_pages()<pywikibot.FilePage.using_pages>`
+* 7.3.0: ``linkitrail`` method of :class:`family.Family` is deprecated; use :meth:`APISite.linktrail()
+ <pywikibot.site._apisite.APISite.linktrail>` instead
* 7.2.0: ``tb`` parameter of :func:`exception()<pywikibot.exception>` function was renamed to ``exc_info``
* 7.2.0: XMLDumpOldPageGenerator is deprecated in favour of a ``content`` parameter of
:func:`XMLDumpPageGenerator<pagegenerators.XMLDumpPageGenerator>` (:phab:`T306134`)
diff --git a/pywikibot/family.py b/pywikibot/family.py
index fa48156..5c8dd28 100644
--- a/pywikibot/family.py
+++ b/pywikibot/family.py
@@ -1,6 +1,6 @@
"""Objects representing MediaWiki families."""
#
-# (C) Pywikibot team, 2004-2023
+# (C) Pywikibot team, 2004-2024
#
# Distributed under the terms of the MIT license.
#
@@ -97,98 +97,117 @@
#: Not open for edits; stewards can still edit.
closed_wikis: list[str] = []
- #: Completely removed sites
+ #: Completely removed sites.
removed_wikis: list[str] = []
code_aliases: dict[str, str] = {}
"""Code mappings which are only an alias, and there is no 'old' wiki.
-
For all except 'nl_nds', subdomains do exist as a redirect, but that
should not be relied upon.
"""
langs: dict[str, str] = {}
- # A list of category redirect template names in different languages
+ #: A list of category redirect template names in different languages.
category_redirect_templates: dict[str, Sequence[str]] = {
'_default': []
}
- # A list of disambiguation template names in different languages
+ #: A list of disambiguation template names in different languages.
disambiguationTemplates: dict[str, Sequence[str]] = {
'_default': []
}
- # A dict of tuples for different sites with names of templates
- # that indicate an edit should be avoided
edit_restricted_templates: dict[str, tuple[str, ...]] = {}
+ """A dict of tuples for different sites with names of templates that
+ indicate an edit should be avoided.
+ """
- # A dict of tuples for different sites with names of archive
- # templates that indicate an edit of non-archive bots
- # should be avoided
archived_page_templates: dict[str, tuple[str, ...]] = {}
+ """A dict of tuples for different sites with names of archive
+ templates that indicate an edit of non-archive bots should be
+ avoided.
+ """
- # A set of projects that share cross-project sessions.
+ #: A set of projects that share cross-project sessions.
cross_projects: set[str] = set()
- # A list with the name for cross-project cookies.
- # default for wikimedia centralAuth extensions.
+ #: A list with the name for cross-project cookies, default for
+ #: wikimedia centralAuth extensions.
cross_projects_cookies = ['centralauth_Session',
'centralauth_Token',
'centralauth_User']
cross_projects_cookie_username = 'centralauth_User'
- # A list with the name in the cross-language flag permissions
+ #: A list with the name in the cross-language flag permissions.
cross_allowed: list[str] = []
- # A dict with the name of the category containing disambiguation
- # pages for the various languages. Only one category per language,
- # and without the namespace, so add things like:
- # 'en': "Disambiguation"
disambcatname: dict[str, str] = {}
+ """A dict with the name of the category containing disambiguation
+ pages for the various languages. Only one category per language, and
+ without the namespace, so add things like:
- # attop is a list of languages that prefer to have the interwiki
- # links at the top of the page.
+ 'en': "Disambiguation"
+ """
+
interwiki_attop: list[str] = []
- # on_one_line is a list of languages that want the interwiki links
- # one-after-another on a single line
+ """attop is a list of languages that prefer to have the interwiki
+ links at the top of the page.
+ """
+
interwiki_on_one_line: list[str] = []
- # String used as separator between interwiki links and the text
+ """on_one_line is a list of languages that want the interwiki links
+ one-after-another on a single line
+ """
+
+ #: String used as separator between interwiki links and the text.
interwiki_text_separator = '\n\n'
# Similar for category
category_attop: list[str] = []
- # on_one_line is a list of languages that want the category links
- # one-after-another on a single line
+ """attop is a list of categories that prefer to have the category
+ links at the top of the page.
+ """
+
category_on_one_line: list[str] = []
- # String used as separator between category links and the text
+ """on_one_line is a list of languages that want the category links
+ one-after-another on a single line.
+ """
+
+ #: String used as separator between category links and the text
category_text_separator = '\n\n'
- # When both at the bottom should categories come after interwikilinks?
- # TODO: T86284 Needed on Wikia sites, as it uses the CategorySelect
- # extension which puts categories last on all sites. TO BE DEPRECATED!
+
categories_last: list[str] = []
+ """When both at the bottom should categories come after
+ interwikilinks?
- # Which languages have a special order for putting interlanguage
- # links, and what order is it? If a language is not in
- # interwiki_putfirst, alphabetical order on language code is used.
- # For languages that are in interwiki_putfirst, interwiki_putfirst
- # is checked first, and languages are put in the order given there.
- # All other languages are put after those, in code-alphabetical
- # order.
+ TODO: :phab:`T86284` Needed on Wikia sites, as it uses the
+ CategorySelect extension which puts categories last on all sites.
+ TO BE DEPRECATED!
+ """
+
interwiki_putfirst: dict[str, str] = {}
+ """Which languages have a special order for putting interlanguage
+ links, and what order is it? If a language is not in
+ interwiki_putfirst, alphabetical order on language code is used. For
+ languages that are in interwiki_putfirst, interwiki_putfirst is
+ checked first, and languages are put in the order given there. All
+ other languages are put after those, in code-alphabetical order.
+ """
- # Some families, e. g. commons and meta, are not multilingual and
- # forward interlanguage links to another family (wikipedia).
- # These families can set this variable to the name of the target
- # family.
interwiki_forward: str | None = None
+ """Some families, e. g. commons and meta, are not multilingual and
+ forward interlanguage links to another family (wikipedia). These
+ families can set this variable to the name of the target family.
+ """
- # Language codes of the largest wikis. They should be roughly sorted
- # by size.
languages_by_size: list[str] = []
+ """Language codes of the largest wikis. They should be roughly
+ sorted by size.
+ """
- # Some languages belong to a group where the possibility is high that
- # equivalent articles have identical titles among the group.
+ #: Some languages belong to a group where the possibility is high
+ #: that equivalent articles have identical titles among the group.
language_groups = {
# languages using the Arabic script
'arab': [
@@ -248,37 +267,48 @@
],
}
- # LDAP domain if your wiki uses LDAP authentication,
- # https://www.mediawiki.org/wiki/Extension:LDAPAuthentication2
ldapDomain = ()
+ """LDAP domain if your wiki uses LDAP authentication.
- # Allows crossnamespace interwiki linking.
- # Lists the possible crossnamespaces combinations
- # keys are originating NS
- # values are dicts where:
- # keys are the originating langcode, or _default
- # values are dicts where:
- # keys are the languages that can be linked to from the lang+ns, or
- # '_default'; values are a list of namespace numbers
+ .. seealso:: https://www.mediawiki.org/wiki/Extension:LDAPAuthentication2
+ """
+
crossnamespace: CrossnamespaceType = collections.defaultdict(dict)
- ##
- # Examples :
- #
- # Allowing linking to pt' 102 NS from any other lang' 0 NS is
- #
- # crossnamespace[0] = {
- # '_default': { 'pt': [102]}
- # }
- #
- # While allowing linking from pt' 102 NS to any other lang' = NS is
- #
- # crossnamespace[102] = {
- # 'pt': { '_default': [0]}
- # }
+ """Allows crossnamespace interwiki linking.
- # Some wiki farms have UrlShortener extension enabled only on the main
- # site. This value can specify this last one with (lang, family) tuple.
+ Lists the possible crossnamespaces combinations; keys are
+ originating namespace; values are dicts where keys are the
+ originating langcode, or ``_default`` and values are dicts where
+ keys are the languages that can be linked to from the lang+ns, or
+ ``_default``; values are a list of namespace numbers.
+
+ **Examples:**
+
+ Allowing linking *to* ``pt`` 102 namespace from any other lang 0
+ namepace is:
+
+ .. code-block:: Python
+
+ crossnamespace[0] = {
+ '_default': { 'pt': [102]}
+ }
+
+ While allowing linking *from* ``pt`` 102 namespace to any other
+ lang 0 namespace is
+
+ .. code-block:: Python
+
+ crossnamespace[102] = {
+ 'pt': { '_default': [0]}
+ }
+
+ """
+
shared_urlshortner_wiki: tuple[str, str] | None = None
+ """Some wiki farms have UrlShortener extension enabled only on
+ the main site. This value can specify this last one with
+ ``(lang, family)`` tuple.
+ """
title_delimiter_and_aliases = ' _'
"""Titles usually are delimited by a space and the alias is replaced
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/994675?usp=email
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: I8bc1a19fc6c451cbb57c97124d8ef9f10cf3afe8
Gerrit-Change-Number: 994675
Gerrit-PatchSet: 6
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/994673?usp=email )
Change subject: [PEP8] rename transliteration.transliterator to Transliterator
......................................................................
[PEP8] rename transliteration.transliterator to Transliterator
Change-Id: I5fb4b651360e32f4d65d07f2d5c35e494cb6c28f
---
M ROADMAP.rst
M pywikibot/userinterfaces/terminal_interface_base.py
M pywikibot/userinterfaces/transliteration.py
3 files changed, 21 insertions(+), 4 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/ROADMAP.rst b/ROADMAP.rst
index 5c244b1..65f3950 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -28,9 +28,11 @@
Breaking changes and code cleanups
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+* ``userinterfaces.transliteration.transliterator`` was renamed to :class:`Transliterator
+ <userinterfaces.transliteration.Transliterator>`
* ``pywikibot.BaseSite`` and ``pywikibotAPISite`` were dropped. :func:`pywikibot.Site` has to be used to create a
:mod:`site` object.
-* ``next`` parameter of :meth:`userinterfaces.transliteration.transliterator.transliterate` was renamed to ``succ``
+* ``next`` parameter of :meth:`userinterfaces.transliteration.Transliterator.transliterate` was renamed to ``succ``
* ``type`` parameter of :meth:`site.APISite.protectedpages()<pywikibot.site._generators.GeneratorsMixin.protectedpages>`
was renamed to ``protect_type``
* ``all`` parameter of :meth:`site.APISite.namespace()<pywikibot.site._apisite.APISite.namespace>` was renamed to
@@ -65,6 +67,8 @@
Deprecations
------------
+* 9.0.0: ``userinterfaces.transliteration.transliterator`` was renamed to :class:`Transliterator
+ <userinterfaces.transliteration.Transliterator>`
* 9.0.0: ``next`` parameter of :meth:`userinterfaces.transliteration.transliterator.transliterate` was renamed to
``succ``
* 9.0.0: ``type`` parameter of :meth:`site.APISite.protectedpages()
diff --git a/pywikibot/userinterfaces/terminal_interface_base.py b/pywikibot/userinterfaces/terminal_interface_base.py
index 83f7f4a..fb76bf3 100644
--- a/pywikibot/userinterfaces/terminal_interface_base.py
+++ b/pywikibot/userinterfaces/terminal_interface_base.py
@@ -30,7 +30,7 @@
from pywikibot.userinterfaces._interface_base import ABUIC
-transliterator = transliteration.transliterator(config.console_encoding)
+transliterator = transliteration.Transliterator(config.console_encoding)
#: Colors supported by Pywikibot
colors = [
diff --git a/pywikibot/userinterfaces/transliteration.py b/pywikibot/userinterfaces/transliteration.py
index 0bbc083..4ad1d85 100644
--- a/pywikibot/userinterfaces/transliteration.py
+++ b/pywikibot/userinterfaces/transliteration.py
@@ -6,7 +6,7 @@
#
from __future__ import annotations
-from pywikibot.tools import deprecate_arg
+from pywikibot.tools import ModuleDeprecationWrapper, deprecate_arg
#: Non latin digits used by the framework
@@ -1100,7 +1100,7 @@
_trans.update({char: str(i) for i, char in enumerate(digits)})
-class transliterator: # noqa: N801
+class Transliterator:
"""Class to transliterating text."""
@@ -1150,3 +1150,7 @@
elif char == 'ຫ':
result = '' if next in 'ງຍນຣລຼຼວ' else 'h'
return result
+
+
+wrapper = ModuleDeprecationWrapper(__name__)
+wrapper.add_deprecated_attr('transliterator', Transliterator, since='9.0.0')
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/994673?usp=email
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: I5fb4b651360e32f4d65d07f2d5c35e494cb6c28f
Gerrit-Change-Number: 994673
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/994671?usp=email )
Change subject: [doc] Update ROADMAP.rst
......................................................................
[doc] Update ROADMAP.rst
Change-Id: Ie6fdcc89d5d4f3e39768c1d89330b11d10645dc8
---
M ROADMAP.rst
1 file changed, 40 insertions(+), 4 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/ROADMAP.rst b/ROADMAP.rst
index b399e0f..5c244b1 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -4,6 +4,7 @@
Improvements
^^^^^^^^^^^^
+* Add :func:`config.base_dir<config.get_base_dir>` to scripts search path with :mod:`pwb` wrapper (:phab:`T324287`)
* :meth:`pywikibot.WbTime.equal_instant` was added (:phab:`T325248`)
* ``revisions`` parameter of :class:`xmlreader.XmlDump` was introduced to specify parsing method
(:phab:`T340804`)
@@ -16,6 +17,9 @@
Bugfixes
^^^^^^^^
+* Add ``hy`` to special languages in :class:`textlib.TimeStripper` (:phab:`T356175`)
+* Pass login token when using ``action=login`` (:phab:`T309898`)
+* Detect range blocks with :meth:`pywikibot.User.is_blocked` (:phab:`T301282`)
* Use only ``end`` tags in ElementTree.iterparse in :mod:`xmlreader` module (:phab:`T354095`)
* Suppress error in :meth:`cosmetic_changes.CosmeticChangesToolkit.cleanUpLinks` (:phab:`T337045`)
* :func:`pywikibot.input_choice` validates *default* parameter (:phab:`T353097`)
@@ -24,6 +28,17 @@
Breaking changes and code cleanups
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+* ``pywikibot.BaseSite`` and ``pywikibotAPISite`` were dropped. :func:`pywikibot.Site` has to be used to create a
+ :mod:`site` object.
+* ``next`` parameter of :meth:`userinterfaces.transliteration.transliterator.transliterate` was renamed to ``succ``
+* ``type`` parameter of :meth:`site.APISite.protectedpages()<pywikibot.site._generators.GeneratorsMixin.protectedpages>`
+ was renamed to ``protect_type``
+* ``all`` parameter of :meth:`site.APISite.namespace()<pywikibot.site._apisite.APISite.namespace>` was renamed to
+ ``all_ns``
+* ``filter`` parameter of :func:`date.dh` was renamed to ``filter_func``
+* ``dict`` parameter of :class:`data.api.OptionSet` was renamed to ``data``
+* ``setuptools`` package is no longer mandatory but required for tests
+ (:phab:`T340640`, :phab:`T347052`, :phab:`T354515`)
* ``root`` attribute of :class:`xmlreader.XmlDump` was removed
* ``tools.Version`` class was removed; use classes from ``packaging.version`` instead (:phab:`T340640`)
* ``packaging`` package is mandatory; ``importlib_metadata`` package is required for Python 3.7 (:phab:`T340640`)
@@ -34,7 +49,8 @@
* require ``PyMySQL >= 1.0.0`` if necessary
* ``keys()`` and ``items()`` methods of :class:`data.api.Request` gives a view instead a list (:phab:`T310953`)
* ``SequenceOutputter.format_list()`` was removed in favour of :attr:`tools.formatter.SequenceOutputter.out` property
-* *output* parameter of :class:`bot_choice.OutputProxyOption` (i.e. ``OutputOption`` instance) without *out* property is no longer supported
+* *output* parameter of :class:`bot_choice.OutputProxyOption` (i.e. ``OutputOption`` instance) without *out* property is
+ no longer supported
* ``OutputOption.output()`` method was removed
* ``ContextOption.output_range()`` and ``HighlightContextOption.output_range()`` methods were removed
* ``page.url2unicode()`` function was removed in favour of :func:`tools.chars.url2string`
@@ -49,10 +65,20 @@
Deprecations
------------
+* 9.0.0: ``next`` parameter of :meth:`userinterfaces.transliteration.transliterator.transliterate` was renamed to
+ ``succ``
+* 9.0.0: ``type`` parameter of :meth:`site.APISite.protectedpages()
+ <pywikibot.site._generators.GeneratorsMixin.protectedpages>` was renamed to ``protect_type``
+* 9.0.0: ``all`` parameter of :meth:`site.APISite.namespace()<pywikibot.site._apisite.APISite.namespace>` was renamed to
+ ``all_ns``
+* 9.0.0: ``filter`` parameter of :func:`date.dh` was renamed to ``filter_func``
+* 9.0.0: ``dict`` parameter of :class:`data.api.OptionSet` was renamed to ``data``
* 9.0.0: ``pywikibot.version.get_toolforge_hostname()`` is deprecated without replacement
-* 9.0.0: ``allrevisions`` parameter of :class:`xmlreader.XmpDump` is deprecated, use ``revisions`` instead (:phab:`T340804`)
+* 9.0.0: ``allrevisions`` parameter of :class:`xmlreader.XmpDump` is deprecated, use ``revisions`` instead
+ (:phab:`T340804`)
* 9.0.0: ``iteritems`` method of :class:`data.api.Request` will be removed in favour of ``items``
-* 9.0.0: ``SequenceOutputter.output()`` is deprecated in favour of :attr:`tools.formatter.SequenceOutputter.out` property
+* 9.0.0: ``SequenceOutputter.output()`` is deprecated in favour of :attr:`tools.formatter.SequenceOutputter.out`
+ property
* 9.0.0: *nullcontext* context manager and *SimpleQueue* queue of :mod:`backports` are derecated
* 8.4.0: *modules_only_mode* parameter of :class:`data.api.ParamInfo`, its *paraminfo_keys* class attribute
and its preloaded_modules property will be removed
@@ -98,6 +124,7 @@
* 7.1.0: Unused ``get_redirect`` parameter of :meth:`Page.getOldVersion()<page.BasePage.getOldVersion>` will be removed
* 7.0.0: User.isBlocked() method is renamed to is_blocked for consistency
* 7.0.0: A boolean watch parameter in Page.save() is deprecated and will be desupported
-* 7.0.0: baserevid parameter of editSource(), editQualifier(), removeClaims(), removeSources(), remove_qualifiers() DataSite methods will be removed
+* 7.0.0: baserevid parameter of editSource(), editQualifier(), removeClaims(), removeSources(), remove_qualifiers()
+ DataSite methods will be removed
* 7.0.0: Values of APISite.allpages() parameter filterredir other than True, False and None are deprecated
* 7.0.0: The i18n identifier 'cosmetic_changes-append' will be removed in favour of 'pywikibot-cosmetic-changes'
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/994671?usp=email
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: Ie6fdcc89d5d4f3e39768c1d89330b11d10645dc8
Gerrit-Change-Number: 994671
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/994332?usp=email )
Change subject: [bugfix] Add hy to special languages in TimeStripper
......................................................................
[bugfix] Add hy to special languages in TimeStripper
Also hy needs to check both upper and lower case for months.
Bug: T356175
Change-Id: Ibc7982084102735ffa87fd8d97f6a2813c7176ca
---
M pywikibot/textlib.py
1 file changed, 20 insertions(+), 5 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index 75c3d87..788df3a 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -1,6 +1,6 @@
"""Functions for manipulating wiki-text."""
#
-# (C) Pywikibot team, 2008-2023
+# (C) Pywikibot team, 2008-2024
#
# Distributed under the terms of the MIT license.
#
@@ -1985,10 +1985,13 @@
self.site = pywikibot.Site() if site is None else site
self.origNames2monthNum = {}
- # use first_lower/first_upper for 'vi' language because monthsnames
- # were changed: T324310
- functions = [first_upper,
- first_lower] if self.site.lang == 'vi' else [str]
+ # use first_lower/first_upper for those language where month names
+ # were changed: T324310, T356175
+ if self.site.lang in ('hy', 'vi'):
+ functions = [first_upper, first_lower]
+ else:
+ functions = [str]
+
for n, (long, short) in enumerate(self.site.months_names, start=1):
for func in functions:
self.origNames2monthNum[func(long)] = n
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/994332?usp=email
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: Ibc7982084102735ffa87fd8d97f6a2813c7176ca
Gerrit-Change-Number: 994332
Gerrit-PatchSet: 1
Gerrit-Owner: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged