Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #3818
Status: Errored
Duration: 47 minutes and 31 seconds
Commit: 851daa3 (master)
Author: zhuyifei1999
Message: APISite.data_repository(): handle warning with re.match()
In 4e6810e, the message was added to i18n. During the process,
the message changed: a period was added to the end, and the single
quotation marks (') were changed to <var> tag, which in turn creates
double quotation marks ("). However, luckily, the warning (somehow
converted from an error internally in MediaWiki) seems to stay in
English regardless of which site we are operating on.
Like the other places where req._warning_handler is used, here, to
maintain backwards compatibility, we regex-compare the warning to
account for the changes to the warning message. The regex itself is
not wrapped after 80 characters due to that wrapping a string would
be easily confused with wrapping multiple parameters.
Bug: T156596
Change-Id: I47436809960de23746eeb4877a9919772ce11448
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/a188e897b0de...851daa3d…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/197038763
--
You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/335254 )
Change subject: APISite.data_repository(): handle warning with re.match()
......................................................................
APISite.data_repository(): handle warning with re.match()
In 4e6810e, the message was added to i18n. During the process,
the message changed: a period was added to the end, and the single
quotation marks (') were changed to <var> tag, which in turn creates
double quotation marks ("). However, luckily, the warning (somehow
converted from an error internally in MediaWiki) seems to stay in
English regardless of which site we are operating on.
Like the other places where req._warning_handler is used, here, to
maintain backwards compatibility, we regex-compare the warning to
account for the changes to the warning message. The regex itself is
not wrapped after 80 characters due to that wrapping a string would
be easily confused with wrapping multiple parameters.
Bug: T156596
Change-Id: I47436809960de23746eeb4877a9919772ce11448
---
M pywikibot/site.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py
index f2724d9..2491a54 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -2761,8 +2761,8 @@
"""
def handle_warning(mod, warning):
return (mod == 'query' and
- warning == "Unrecognized value for parameter 'meta': "
- "wikibase")
+ re.match(r'Unrecognized value for parameter [\'"]meta[\'"]: wikibase',
+ warning))
req = self._simple_request(action='query', meta='wikibase')
req._warning_handler = handle_warning
--
To view, visit https://gerrit.wikimedia.org/r/335254
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I47436809960de23746eeb4877a9919772ce11448
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Zhuyifei1999 <zhuyifei1999(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Legoktm <legoktm(a)member.fsf.org>
Gerrit-Reviewer: Zhuyifei1999 <zhuyifei1999(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #3817
Status: Errored
Duration: 46 minutes and 37 seconds
Commit: a188e89 (master)
Author: dalba
Message: test_bot_may_edit_general: Make sure `ignore_bot_templates` is False
Previously, if ignore_bot_templates was set to True in user-config.py, the test
would have failed with the following error:
Failure
Traceback (most recent call last):
File "...\pywikibot-core\tests\page_tests.py", line 709, in test_bot_may_edit_general
self.assertFalse(page.botMayEdit())
AssertionError: True is not false
Change-Id: I4118b2cb42950e030fa81f70ff8b06e54233758e
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/c75c66716035...a188e897…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/196953025
--
You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/335193 )
Change subject: test_bot_may_edit_general: Make sure `ignore_bot_templates` is False
......................................................................
test_bot_may_edit_general: Make sure `ignore_bot_templates` is False
Previously, if ignore_bot_templates was set to True in user-config.py, the test
would have failed with the following error:
Failure
Traceback (most recent call last):
File "...\pywikibot-core\tests\page_tests.py", line 709, in test_bot_may_edit_general
self.assertFalse(page.botMayEdit())
AssertionError: True is not false
Change-Id: I4118b2cb42950e030fa81f70ff8b06e54233758e
---
M tests/page_tests.py
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
jenkins-bot: Verified
Sn1per: Looks good to me, approved
diff --git a/tests/page_tests.py b/tests/page_tests.py
index fa2f2f2..deb0274 100644
--- a/tests/page_tests.py
+++ b/tests/page_tests.py
@@ -691,6 +691,7 @@
cached = True
user = True
+ @mock.patch.object(config, 'ignore_bot_templates', False)
def test_bot_may_edit_general(self):
"""Test that bot is allowed to edit."""
site = self.get_site()
--
To view, visit https://gerrit.wikimedia.org/r/335193
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4118b2cb42950e030fa81f70ff8b06e54233758e
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Sn1per <geofbot(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/333570 )
Change subject: textlib.py: fix typos and update year in comments
......................................................................
textlib.py: fix typos and update year in comments
Change-Id: I4592548daabe8bd2398fc28d4cf146874d6e5de8
---
M pywikibot/textlib.py
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index d981c51..51d71f2 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -7,7 +7,7 @@
"""
#
-# (C) Pywikibot team, 2008-2016
+# (C) Pywikibot team, 2008-2017
#
# Distributed under the terms of the MIT license.
#
@@ -127,7 +127,7 @@
'or': u'୦୧୨୩୪୫୬୭୮୯',
}
-# Used in TimeStripper. When a timestamp-like line have longer gaps
+# Used in TimeStripper. When a timestamp-like line has longer gaps
# than this between year, month, etc in it, then the line will not be
# considered to contain a timestamp.
TIMESTAMP_GAP_LIMIT = 10
@@ -137,8 +137,8 @@
"""
Change Latin digits based on language to localized version.
- Be aware that this function only returns for several language
- And doesn't touch the input if other languages are asked.
+ Be aware that this function only returns for several languages,
+ and that it doesn't touch the input if other languages are asked.
@param phrase: The phrase to convert to localized numerical
@param lang: language code
@return: The localized version
--
To view, visit https://gerrit.wikimedia.org/r/333570
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4592548daabe8bd2398fc28d4cf146874d6e5de8
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Whym <whym(a)whym.org>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/333146 )
Change subject: Fix pytest-httpbin support breaking Python 2.6 builds
......................................................................
Fix pytest-httpbin support breaking Python 2.6 builds
Bug: T155208
Change-Id: I482df3e10bd684d35abd9d72435fd48f2f3e0fd7
---
M tests/aspects.py
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/aspects.py b/tests/aspects.py
index 993f9cd..7a2c48a 100644
--- a/tests/aspects.py
+++ b/tests/aspects.py
@@ -502,7 +502,8 @@
# If pytest_httpbin will be used during tests, then remove httpbin.org from sites.
if httpbin_used:
- cls.sites = {k: v for k, v in cls.sites.items() if 'httpbin.org' not in v['hostname']}
+ cls.sites = dict((k, v) for k, v in cls.sites.items()
+ if 'httpbin.org' not in v['hostname'])
for key, data in cls.sites.items():
if 'hostname' not in data:
--
To view, visit https://gerrit.wikimedia.org/r/333146
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I482df3e10bd684d35abd9d72435fd48f2f3e0fd7
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Phantom42 <nikitav30(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>