jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/988018 )
Change subject: [doc] Update documentation
......................................................................
[doc] Update documentation
Change-Id: I115f1bdc94617513e1507de2f43c35007113be7f
---
M ROADMAP.rst
M pywikibot/xmlreader.py
M pywikibot/_wbtypes.py
3 files changed, 41 insertions(+), 14 deletions(-)
Approvals:
DannyS712: Looks good to me, but someone else must approve
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/ROADMAP.rst b/ROADMAP.rst
index 34a838d..b399e0f 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -4,9 +4,10 @@
Improvements
^^^^^^^^^^^^
+* :meth:`pywikibot.WbTime.equal_instant` was added (:phab:`T325248`)
* ``revisions`` parameter of :class:`xmlreader.XmlDump` was introduced to specify parsing method
(:phab:`T340804`)
-* Pass global -nolog argument into bot script from wrapper (:phab:`T328900`)
+* Pass global -nolog argument into bot script from wrapper (:phab:`T328900`)
* Add :meth:`site.APISite.ratelimit()<pywikibot.site._apisite.APISite.ratelimit>` method
and :class:`tools.collections.RateLimit` NamedTuple (:phab:`T304808`)
* L10N Updates
@@ -23,6 +24,7 @@
Breaking changes and code cleanups
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+* ``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`)
* ``SelfCallMixin``, ``SelfCallDict`` and ``SelfCallString`` of :mod:`tools` module were removed
@@ -30,7 +32,7 @@
is no longer supported
* ``config.register_family_file()`` function was removed
* require ``PyMySQL >= 1.0.0`` if necessary
-* ``keys()`` and ``items()`` methods of :class:`data.api.Reques` gives a view instead a list (:phab:`T310953`)
+* ``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
* ``OutputOption.output()`` method was removed
diff --git a/pywikibot/_wbtypes.py b/pywikibot/_wbtypes.py
index 47322df5..1daf583 100644
--- a/pywikibot/_wbtypes.py
+++ b/pywikibot/_wbtypes.py
@@ -1,6 +1,6 @@
"""Wikibase data type classes."""
#
-# (C) Pywikibot team, 2013-2023
+# (C) Pywikibot team, 2013-2024
#
# Distributed under the terms of the MIT license.
#
@@ -530,6 +530,8 @@
For example, a time with at 10:00 UTC-5 would return false if checked
with == with a time at 15:00 UTC, but would return true with
this method.
+
+ .. versionadded:: 9.0
"""
return self._getSecondsAdjusted() == other._getSecondsAdjusted()
diff --git a/pywikibot/xmlreader.py b/pywikibot/xmlreader.py
index fa5f53b..bb8c4d1 100644
--- a/pywikibot/xmlreader.py
+++ b/pywikibot/xmlreader.py
@@ -11,7 +11,7 @@
vulnerable XML attacks. *defusedxml* 0.7.1 or higher is recommended.
"""
#
-# (C) Pywikibot team, 2005-2023
+# (C) Pywikibot team, 2005-2024
#
# Distributed under the terms of the MIT license.
#
@@ -58,7 +58,10 @@
class Headers(NamedTuple):
- """Represent the common info of a page."""
+ """Represent the common info of a page.
+
+ .. versionadded:: 9.0
+ """
title: str
ns: str
@@ -70,7 +73,10 @@
class RawRev(NamedTuple):
- """Represent a raw revision."""
+ """Represent a raw revision.
+
+ .. versionadded:: 9.0
+ """
headers: Headers
revision: Element
@@ -89,8 +95,9 @@
.. versionchanged:: 7.2
`allrevisions` parameter must be given as keyword parameter
.. versionchanged:: 9.0
- `allrevisions` parameter deprecated due to :phab:`T340804`
- `revisions` parameter introduced as replacement
+ `allrevisions` parameter is deprecated due to :phab:`T340804`,
+ `revisions` parameter was introduced as replacement.
+ `root` attribute was removed.
Usage example:
@@ -202,11 +209,9 @@
root.clear()
def _parse_only_first_found(self, elem: Element) -> Iterator[XmlEntry]:
- """
- Deprecated parser that yields the first revision found.
+ """Parser that yields the first revision found.
- Documentation had wrongly indicated it returned the latest revision.
- :phab: `T340804`
+ .. versionadded:: 9.0
"""
raw_revs = self._fetch_revs(elem)
try:
@@ -223,7 +228,10 @@
yield self._create_revision(raw_rev.headers, raw_rev.revision)
def _parse_only_earliest(self, elem: Element) -> Iterator[XmlEntry]:
- """Parser that yields only the earliest revision."""
+ """Parser that yields only the earliest revision.
+
+ .. versionadded:: 9.0
+ """
raw_revs = self._fetch_revs(elem, with_id=True)
raw_rev = min(raw_revs, default=None, key=lambda rev: rev.revid)
if raw_rev is not None:
@@ -236,7 +244,10 @@
yield self._create_revision(raw_rev.headers, raw_rev.revision)
def _fetch_revs(self, elem: Element, with_id=False) -> Iterator[RawRev]:
- """Yield all revisions in a page."""
+ """Yield all revisions in a page.
+
+ .. versionadded:: 9.0
+ """
uri = self.uri
headers = self._headers(elem)
for revision in elem.findall(f'{uri}revision'):
@@ -253,6 +264,9 @@
Returns strings representing user groups allowed to edit and
to move a page, where None means there are no restrictions.
+
+ .. versionadded:: 9.0
+ replaces deprecated ``parseRestrictions`` function.
"""
if not restrictions:
return None, None
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/988018
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: I115f1bdc94617513e1507de2f43c35007113be7f
Gerrit-Change-Number: 988018
Gerrit-PatchSet: 2
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-CC: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/i18n/+/987755 )
Change subject: Localisation updates from https://translatewiki.net.
......................................................................
Localisation updates from https://translatewiki.net.
Change-Id: Id30e8ba4231e31bdba0f9a76853dae0e9e9c5f63
---
M protect/ar.json
A replicate_wiki/ar.json
M checkimages/ar.json
3 files changed, 28 insertions(+), 2 deletions(-)
Approvals:
L10n-bot: Looks good to me, approved
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/checkimages/ar.json b/checkimages/ar.json
index c4f2ad2..2a0b455 100644
--- a/checkimages/ar.json
+++ b/checkimages/ar.json
@@ -2,6 +2,7 @@
"@metadata": {
"authors": [
"Meno25",
+ "Sandra Hanbo",
"xqt"
]
},
@@ -9,6 +10,9 @@
"checkimages-doubles-file-comment": "بوت: الملف موجود في كومنز، يمكن حذفه",
"checkimages-doubles-head": "ملف مكرر",
"checkimages-doubles-talk-comment": "بوت: إخطار أن الملف موجود فعلا في كومنز",
+ "checkimages-doubles-talk-text": "شكرًا لتحميلك %(upload)s. ومع ذلك، هذا الملف عبارة عن نسخة من:%(image)s قام البوت بوضع علامة على الملف المكرر باعتباره الملف الأقل استخدامًا أو الأحدث. إذا رأيت أنه من المناسب ترك الملف محددًا بأنه سيتم حذفه على الفور، فلا تتردد في حذف الملفات المكررة وإزالة قالب الحذف من القالب الذي سيتم تركه. هذه رسالة تلقائية من %(bot)s.",
+ "checkimages-forced-mode": "('''الوضع القسري''')",
+ "checkimages-has-duplicates": "يحتوي على التكرارات التالية%(force)s:",
"checkimages-log-comment": "بوت: تحديث السجل",
"checkimages-no-license-head": "صورة بدون ترخيص",
"checkimages-source-tag-comment": "بوت: التعليم على ملف مرفوع حديثا غير موسوم",
diff --git a/protect/ar.json b/protect/ar.json
index a6c059b..8cfb254 100644
--- a/protect/ar.json
+++ b/protect/ar.json
@@ -1,12 +1,13 @@
{
"@metadata": {
"authors": [
- "Meno25"
+ "Meno25",
+ "Sandra Hanbo"
]
},
"protect-category": "بوت: حماية كل الصفحات من التصنيف %(cat)s",
"protect-images": "بوت: حماية كل الصور في الصفحة %(page)s",
"protect-links": "بوت: حماية كل الصفحات الموصولة من %(page)s",
- "protect-ref": "بوت: حماية كل الصفحات الراجعة من %(page)s",
+ "protect-ref": "بوت: رفع حماية كل الصفحات التي ترجع من %(page)s",
"protect-simple": "بوت: حماية قائمة من الملفات."
}
diff --git a/replicate_wiki/ar.json b/replicate_wiki/ar.json
new file mode 100644
index 0000000..1b1c9c2
--- /dev/null
+++ b/replicate_wiki/ar.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "Sandra Hanbo"
+ ]
+ },
+ "replicate_wiki-headline": "صفحات تختلف عن الأصلية",
+ "replicate_wiki-missing-users": "الإداريون من الأصل المفقودون هنا",
+ "replicate_wiki-same-pages": "جميع الصفحات المهمة هي نفسها",
+ "replicate_wiki-same-users": "جميع المستخدمين من الأصل موجودون أيضًا على هذا الويكي",
+ "replicate_wiki-summary": "بوت: مزامنة الويكي من %(source)s"
+}
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/i18n/+/987755
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/i18n
Gerrit-Branch: master
Gerrit-Change-Id: Id30e8ba4231e31bdba0f9a76853dae0e9e9c5f63
Gerrit-Change-Number: 987755
Gerrit-PatchSet: 1
Gerrit-Owner: L10n-bot <l10n-bot(a)translatewiki.net>
Gerrit-Reviewer: L10n-bot <l10n-bot(a)translatewiki.net>
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/+/987452 )
Change subject: [doc] update CHANGELOG.rst and ROADMAP
......................................................................
[doc] update CHANGELOG.rst and ROADMAP
Change-Id: I21668ec0b00d3e66212198d7ae6a0d98f10e1c58
---
M ROADMAP.rst
M scripts/CHANGELOG.rst
2 files changed, 33 insertions(+), 0 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/ROADMAP.rst b/ROADMAP.rst
index 22f6916..34a838d 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -4,6 +4,9 @@
Improvements
^^^^^^^^^^^^
+* ``revisions`` parameter of :class:`xmlreader.XmlDump` was introduced to specify parsing method
+ (:phab:`T340804`)
+* Pass global -nolog argument into bot script from wrapper (:phab:`T328900`)
* Add :meth:`site.APISite.ratelimit()<pywikibot.site._apisite.APISite.ratelimit>` method
and :class:`tools.collections.RateLimit` NamedTuple (:phab:`T304808`)
* L10N Updates
@@ -12,6 +15,7 @@
Bugfixes
^^^^^^^^
+* 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`)
* Remove typing imports from user-config.py file (:phab:`T352965`)
@@ -19,6 +23,13 @@
Breaking changes and code cleanups
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+* ``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`)
+* ``SelfCallMixin``, ``SelfCallDict`` and ``SelfCallString`` of :mod:`tools` module were removed
+* Calling :attr:`site.BaseSite.sitename<pywikibot.site._basesite.BaseSite.sitename>` as a function
+ is no longer supported
+* ``config.register_family_file()`` function was removed
+* require ``PyMySQL >= 1.0.0`` if necessary
* ``keys()`` and ``items()`` methods of :class:`data.api.Reques` 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
@@ -37,6 +48,7 @@
------------
* 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: ``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: *nullcontext* context manager and *SimpleQueue* queue of :mod:`backports` are derecated
diff --git a/scripts/CHANGELOG.rst b/scripts/CHANGELOG.rst
index 6dc7f76..d1b701c 100644
--- a/scripts/CHANGELOG.rst
+++ b/scripts/CHANGELOG.rst
@@ -4,11 +4,23 @@
9.0.0
-----
+category_graph
+^^^^^^^^^^^^^^
+
+* Check for ``-from`` option first (:phab:`T354162`)
+* Validate file path input (:phab:`T346417`)
+
category_redirect
^^^^^^^^^^^^^^^^^
* provide category_redirect categories for all WM sites (:phab:`T348914`)
+touch
+^^^^^
+
+* Use site.ratelimit for bulk purge in PurgeBot
+
+
8.5.0
-----
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/987452
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: I21668ec0b00d3e66212198d7ae6a0d98f10e1c58
Gerrit-Change-Number: 987452
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: D3r1ck01 <dalangi-ctr(a)wikimedia.org>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged