Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #2508
Status: Passed
Duration: 46 minutes and 31 seconds
Commit: 3685a24 (2.0)
Author: John Vandenberg
Message: Fix Win32 config.editor detection
Correctly extract the text editor from either .txt or .py
extension registry values.
The winreg.EnumValue invocation was always failing as it used
the wrong parameters.
The extracted text editor command may not work correctly if
it used additional arguments other than "%1". See T102465.
Bug: T70315
Change-Id: I3143bb31ad33b1399ed09fd069b6dae3992926f3
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/af96a16155f4...3685a249…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/70279638
--
You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications
jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] checkimages: Convert generator to iterator
......................................................................
[FIX] checkimages: Convert generator to iterator
With ff628236 the general handling of the script changed and with that it also
now used duplicates based on the hash differently. It tried to step through the
generator but that is not possible without turning them first into a iterator.
Bug: T105188
Change-Id: I02791b150b000beda86b7510663badaf842b41ba
---
M scripts/checkimages.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index 267eb23..e889f4d 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -913,8 +913,8 @@
regexOnCommons = (r"\[\[:File:%s\]\] is also on '''Commons''': "
r"\[\[commons:File:.*?\]\](?: \(same name\))?$"
% re.escape(self.imageName))
- commons_image_with_this_hash = next(site.allimages(sha1=hash_found,
- total=1), None)
+ commons_image_with_this_hash = next(iter(site.allimages(sha1=hash_found,
+ total=1)), None)
if commons_image_with_this_hash:
servTMP = pywikibot.translate(self.site, serviceTemplates)
templatesInTheImage = self.image.templates()
--
To view, visit https://gerrit.wikimedia.org/r/223852
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I02791b150b000beda86b7510663badaf842b41ba
Gerrit-PatchSet: 5
Gerrit-Project: pywikibot/core
Gerrit-Branch: 2.0
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: Remove broken wikis from battlestarwiki family
......................................................................
Remove broken wikis from battlestarwiki family
Moving these languages from langs to interwiki_removals will
cause anyone using Pywikibot to remove any interlanguage links
to these languages when they appear on English and German
Battlestarwiki. However as these sites have been down for a
while, and their User:Interwiki_Bot hasnt been active for many years,
and there are no bot edits in the last month on the English site.
Bug: T103470
Change-Id: Icd54ef6bda2544fb0134a0e7e8267c6ada45cc1c
---
M pywikibot/families/battlestarwiki_family.py
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/families/battlestarwiki_family.py b/pywikibot/families/battlestarwiki_family.py
index 954dfe3..549c085 100644
--- a/pywikibot/families/battlestarwiki_family.py
+++ b/pywikibot/families/battlestarwiki_family.py
@@ -15,7 +15,9 @@
name = 'battlestarwiki'
- languages_by_size = ['en', 'de', 'fr', 'zh', 'es', 'ms', 'tr', 'simple']
+ languages_by_size = ['en', 'de']
+
+ interwiki_removals = ['fr', 'zh', 'es', 'ms', 'tr', 'simple']
langs = dict([(lang, '%s.battlestarwiki.org' % lang)
for lang in languages_by_size])
--
To view, visit https://gerrit.wikimedia.org/r/223883
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Icd54ef6bda2544fb0134a0e7e8267c6ada45cc1c
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: 2.0
Gerrit-Owner: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>
Merlijn van Deen has submitted this change and it was merged.
Change subject: replace.py: remove line endings when reading from file
......................................................................
replace.py: remove line endings when reading from file
Use file.read().splitlines() to prevent spaces from also
being stripped.
Change-Id: I9de69215f98ca583e636b41734ee8effaca5dbee
---
M scripts/replace.py
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/replace.py b/scripts/replace.py
index f5eeeb6..31188d8 100755
--- a/scripts/replace.py
+++ b/scripts/replace.py
@@ -817,7 +817,8 @@
if replacement_file:
try:
with codecs.open(replacement_file, 'r', 'utf-8') as f:
- file_replacements = f.readlines()
+ # strip newlines, but not other characters
+ file_replacements = f.read().splitlines()
except (IOError, OSError) as e:
pywikibot.error(u'Error loading {0}: {1}'.format(
replacement_file, e))
--
To view, visit https://gerrit.wikimedia.org/r/223882
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9de69215f98ca583e636b41734ee8effaca5dbee
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: 2.0
Gerrit-Owner: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: [bugfix] Workaround UnicodeDecodeError on api error
......................................................................
[bugfix] Workaround UnicodeDecodeError on api error
When an API error happens it tries to log the parameters but it fails as they
are in a dict and the str and repr of a dict use the repr of each key and
value. If the value is then a Page instance it gets in Python 2 bytes returned
encoded with the console encoding. If then the str or repr of the dict is
inserted into a unicode it must decode the bytes and uses by default ASCII
which fails if the Page's title contains non-ASCII characters.
This patch works around that by manually decoding the bytes in Python 2 using
the console encoding whenever an API error happens but does not actually fix
Page's repr method so it might still fail at other places. It assumes that the
rest of the str is either also encoded using that or is encoded using ASCII and
that the console encoding is a superset of ASCII.
Conflicts:
pywikibot/data/api.py
tests/api_tests.py
Bug: T66958
Change-Id: I298b7594599dd189211a8c268c7e094d042f40e6
---
M pywikibot/data/api.py
1 file changed, 14 insertions(+), 2 deletions(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index f0a5831..0d4d01e 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -1666,11 +1666,17 @@
pywikibot.error("Detected MediaWiki API exception %s%s"
% (class_name,
"; retrying" if retry else "; raising"))
+ # Due to bug T66958, Page's repr may return non ASCII bytes
+ # Get as bytes in PY2 and decode with the console encoding as
+ # the rest should be ASCII anyway.
+ param_repr = str(self._params)
+ if sys.version_info[0] == 2:
+ param_repr = param_repr.decode(config.console_encoding)
pywikibot.log(u"MediaWiki exception %s details:\n"
u" query=\n%s\n"
u" response=\n%s"
% (class_name,
- pprint.pformat(self._params),
+ pprint.pformat(param_repr),
result))
if retry:
@@ -1726,8 +1732,14 @@
for e in user_tokens.items())))
# raise error
try:
+ # Due to bug T66958, Page's repr may return non ASCII bytes
+ # Get as bytes in PY2 and decode with the console encoding as
+ # the rest should be ASCII anyway.
+ param_repr = str(self._params)
+ if sys.version_info[0] == 2:
+ param_repr = param_repr.decode(config.console_encoding)
pywikibot.log(u"API Error: query=\n%s"
- % pprint.pformat(self._params))
+ % pprint.pformat(param_repr))
pywikibot.log(u" response=\n%s"
% result)
--
To view, visit https://gerrit.wikimedia.org/r/223880
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I298b7594599dd189211a8c268c7e094d042f40e6
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: 2.0
Gerrit-Owner: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: Changing the sandbox content template on Fa WP
......................................................................
Changing the sandbox content template on Fa WP
Bug: T104716
Change-Id: I24824713adedd3135cc5377141d2443e15dc0fd6
---
M scripts/clean_sandbox.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/clean_sandbox.py b/scripts/clean_sandbox.py
index 527da31..b6d9824 100755
--- a/scripts/clean_sandbox.py
+++ b/scripts/clean_sandbox.py
@@ -63,7 +63,7 @@
u'and editing skills below this line. As this page is for editing '
u'experiments, this page will automatically be cleaned every 12 '
u'hours. -->',
- 'fa': u'{{subst:User:Amirobot/sandbox}}',
+ 'fa': u'{{subst:Wikipedia:ربات/sandbox}}',
'fi': u'{{subst:Hiekka}}',
'he': u'{{ארגז חול}}\n<!-- נא לערוך מתחת לשורה זו בלבד, תודה. -->',
'id': u'{{Bakpasir}}\n<!-- Uji coba dilakukan di baris di bawah ini -->',
--
To view, visit https://gerrit.wikimedia.org/r/223877
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I24824713adedd3135cc5377141d2443e15dc0fd6
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: 2.0
Gerrit-Owner: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Huji <huji.huji(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>