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
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/987450 )
Change subject: [IMPR] Raise TypeError when argument has wrong type
......................................................................
[IMPR] Raise TypeError when argument has wrong type
As suggested in the definition of TypeError itself.
Change-Id: If46449966b926c4063f811af472c42c86db8d991
---
M pywikibot/time.py
1 file changed, 23 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/time.py b/pywikibot/time.py
index 8a32bfc..4761535 100644
--- a/pywikibot/time.py
+++ b/pywikibot/time.py
@@ -251,7 +251,12 @@
# to create a clone.
if isinstance(ts, cls):
return ts.replace()
- assert isinstance(ts, str)
+
+ if not isinstance(ts, str):
+ raise TypeError(
+ f'ts argument must be a string or a Timestamp object,'
+ f' not {type(ts).__name__}')
+
return cls._from_iso8601(f'{ts[:10]}{sep}{ts[11:]}')
@classmethod
@@ -289,7 +294,12 @@
# to create a clone.
if isinstance(ts, cls):
return ts.replace()
- assert isinstance(ts, str)
+
+ if not isinstance(ts, str):
+ raise TypeError(
+ f'ts argument must be a string or a Timestamp object,'
+ f' not {type(ts).__name__}')
+
if len(ts) == 8 and not strict:
# year, month and day are given only
ts += '000000'
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/987450
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: If46449966b926c4063f811af472c42c86db8d991
Gerrit-Change-Number: 987450
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
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/987422 )
Change subject: [fix] do not check for installed 'importlib_metadata' and 'packaging'
......................................................................
[fix] do not check for installed 'importlib_metadata' and 'packaging'
Both meodules are imported in backports and needed for the check_modules
funktion. Missing modules are already printed during import of pywikibot.
Change-Id: I0c46b5be772812a169de25d329ffb37ee628bab2
---
M pywikibot/scripts/wrapper.py
1 file changed, 22 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/scripts/wrapper.py b/pywikibot/scripts/wrapper.py
index 3b24e25..730b201 100755
--- a/pywikibot/scripts/wrapper.py
+++ b/pywikibot/scripts/wrapper.py
@@ -38,7 +38,7 @@
renamed to wrapper.py
"""
#
-# (C) Pywikibot team, 2012-2023
+# (C) Pywikibot team, 2012-2024
#
# Distributed under the terms of the MIT license.
#
@@ -241,6 +241,14 @@
from setup import dependencies
for dependency in dependencies:
+ if dependency.startswith(('importlib_metadata', 'packaging')):
+ # Ignore these dependencies because ImportError is raised in an
+ # early state when they are imported in backports. They are already
+ # used at this point. This is a workaound for toolforge where some
+ # modules are not installed as a site-package.
+ # TODO: Check imports from external source
+ continue
+
requirement = Requirement(dependency)
if requirement.marker is None or requirement.marker.evaluate():
try:
@@ -304,7 +312,7 @@
# we need to re-start the entire process. Ask the user to do so.
print('Now, you have to re-execute the command to start your script.')
sys.exit(1)
-except ImportError as e: # raised in textlib
+except ImportError as e: # raised in textlib or backports
sys.exit(e)
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/987422
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: I0c46b5be772812a169de25d329ffb37ee628bab2
Gerrit-Change-Number: 987422
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged