jenkins-bot has submitted this change and it was merged.
Change subject: [bugfix] Enable test_detect_site for wikichristian.org
......................................................................
[bugfix] Enable test_detect_site for wikichristian.org
- SiteDetectionTestCase.test_detect_site() failed for wikichristian.org.
I found several newlines on top of the json file and a Byte Order Mark (BOM).
Removing them solves the problem.
- Also add a __repr__ for MWSite so show this repr string instead of the
generic <pywikibot.site_detect.MWSite object at 0x032D06F0>. Now we get
the class Name with the new url where the json is fetched from
Bug: T128992
Change-Id: Ib8b4c0d5dbf645d4984d26f5ac35f8f98e1ca418
---
M pywikibot/site_detect.py
1 file changed, 7 insertions(+), 1 deletion(-)
Approvals:
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site_detect.py b/pywikibot/site_detect.py
index 61ac438..a6a3003 100644
--- a/pywikibot/site_detect.py
+++ b/pywikibot/site_detect.py
@@ -104,6 +104,10 @@
self.version < MediaWikiVersion('1.14')):
raise RuntimeError('Unsupported version: {0}'.format(self.version))
+ def __repr__(self):
+ return '{0}("{1}")'.format(
+ self.__class__.__name__, self.fromurl)
+
@property
def langs(self):
"""Build interwikimap."""
@@ -157,7 +161,9 @@
def _parse_post_117(self):
"""Parse 1.17+ siteinfo data."""
response = fetch(self.api + '?action=query&meta=siteinfo&format=json')
- info = json.loads(response.content)
+ # remove preleading newlines and Byte Order Mark (BOM), see T128992
+ content = response.content.strip().lstrip('\uFEFF')
+ info = json.loads(content)
self.private_wiki = ('error' in info and
info['error']['code'] == 'readapidenied')
if self.private_wiki:
--
To view, visit https://gerrit.wikimedia.org/r/285071
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib8b4c0d5dbf645d4984d26f5ac35f8f98e1ca418
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>
Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #3416
Status: Errored
Duration: 1 hour, 43 minutes, and 9 seconds
Commit: 75134ba (master)
Author: Mpaa
Message: proofreadpage.py: workaround to allow purging without write rights
Implement workaround to mitigate test failures due to Bug T128994.
Purge pages with a Request that does not check write wrights for the
specific purge action needed by IndexPage.
Bug: T128994
Change-Id: Ide2fa5128e17b79d40f0f464fa5221d471218cbe
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/6c0aeb6fb532...75134ba5…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/124872873
--
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.
Change subject: [bugfix] corrected a missing argument
......................................................................
[bugfix] corrected a missing argument
corrected a missing argument in issue_deprecation_warning call
Detached from Correction branch
Change-Id: Ic0180b5beed87c8dc6bc35103a3e0a541f980dfe
---
M pywikibot/site.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
John Vandenberg: Looks good to me, approved
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py
index a6b96a4..2800514 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -6816,7 +6816,7 @@
def _get_baserevid(self, claim, baserevid):
"""Check that claim.on_item is set and matches baserevid if used."""
if not claim.on_item:
- issue_deprecation_warning('claim without on_item set', 3)
+ issue_deprecation_warning('claim without on_item set', None, 3)
if not baserevid:
warn('Neither claim.on_item nor baserevid provided',
UserWarning, 3)
--
To view, visit https://gerrit.wikimedia.org/r/284641
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0180b5beed87c8dc6bc35103a3e0a541f980dfe
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Andre Engels <andreengels(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #3411
Status: Errored
Duration: 1 hour, 47 minutes, and 21 seconds
Commit: d264915 (master)
Author: xqt
Message: [bugfix] delete_dummy must fetch 'quit' parameter
- 'quit' parameter was introduced in 151482c90f16e86 but tests did not
recognize it. This patch solves that problem.
Bug: T133157
Change-Id: I0162dab5a4de797d18b964948411f1afc94ade9b
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/c856089e44ef...d2649154…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/124556772
--
You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications