jenkins-bot has submitted this change and it was merged.
Change subject: Restore TypeError for allpages and alllinks
......................................................................
Restore TypeError for allpages and alllinks
21a6732 implemented TypeError for multiple namespaces used with
allpages and alllinks, however it is not operative as these methods
were bypassing QueryGenerator's namespace handling.
Change-Id: Id620ca8004cfc5c65f047f4e7cb131ab2378167f
---
M pywikibot/site.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 4851c65..3628842 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -3245,7 +3245,7 @@
filterredir = False
apgen = self._generator(api.PageGenerator, type_arg="allpages",
- gapnamespace=int(namespace),
+ namespaces=namespace,
gapfrom=start, step=step, total=total,
g_content=content)
if prefix:
@@ -3304,7 +3304,7 @@
if unique and fromids:
raise Error("alllinks: unique and fromids cannot both be True.")
algen = self._generator(api.ListGenerator, type_arg="alllinks",
- alnamespace=int(namespace), alfrom=start,
+ namespaces=namespace, alfrom=start,
step=step, total=total)
if prefix:
algen.request["alprefix"] = prefix
--
To view, visit https://gerrit.wikimedia.org/r/182139
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id620ca8004cfc5c65f047f4e7cb131ab2378167f
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: Update broken URL for publisher ranges
......................................................................
Update broken URL for publisher ranges
The URL in a code comment is now a broken link.
Replaced:
http://www.isbn-international.org/converter/ranges.htm
with:
https://web.archive.org/web/20090823122028/http://www.isbn-international.or…
Change-Id: I8674419457247b054ebc68a420a8e5e6aa2d96d5
---
M scripts/isbn.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
M4tx: Looks good to me, but someone else must approve
Ladsgroup: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/isbn.py b/scripts/isbn.py
index 50663ac..2198ea1 100755
--- a/scripts/isbn.py
+++ b/scripts/isbn.py
@@ -51,7 +51,7 @@
}
# Maps each group number to the list of its publisher number ranges.
-# Taken from https://www.isbn-international.org/converter/ranges.htm
+# Taken from https://web.archive.org/web/20090823122028/http://www.isbn-international.or…
ranges = {
'0': [ # English speaking area
('00', '19'),
--
To view, visit https://gerrit.wikimedia.org/r/181607
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8674419457247b054ebc68a420a8e5e6aa2d96d5
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: M4tx <m4tx(a)m4tx.pl>
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: Skip Token tests if user doesn't have rights
......................................................................
Skip Token tests if user doesn't have rights
Following tests will be skipped if user doesn't have rights:
site_tests.TestSiteTokens.*
site_tests.TestSiteObjectDeprecatedFunctions.test_token
site_tests.SiteUserTestCase2.testPatrol
Bug: T85353
Change-Id: I2bb23452880ce624c382bf7b5b8929a64f7e5fb7
---
M tests/site_tests.py
1 file changed, 16 insertions(+), 0 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/site_tests.py b/tests/site_tests.py
index 60bb7bb..fa138bd 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -53,6 +53,10 @@
mysite = self.get_site()
mainpage = self.get_mainpage()
ttype = "edit"
+ if ttype not in mysite.tokens:
+ raise unittest.SkipTest(
+ "Action '%s' not allowed for user %s on wiki %s"
+ % (ttype, mysite.user(), mysite))
try:
token = mysite.tokens[ttype]
except KeyError:
@@ -1160,6 +1164,11 @@
"""Test the site.patrol() method."""
mysite = self.get_site()
+ if 'patrol' not in mysite.tokens:
+ raise unittest.SkipTest(
+ "Action patrol is not allowed for user {0} on wiki {1}"
+ .format(mysite.user(), mysite))
+
rc = list(mysite.recentchanges(total=1))[0]
# site.patrol() needs params
@@ -1253,7 +1262,14 @@
raise unittest.SkipTest(
u'Site %s version %s is too low for this tests.'
% (self.mysite, self._version))
+
+ if in_tested not in self.mysite.tokens:
+ raise unittest.SkipTest(
+ 'Action %s is not allowed for user %s on wiki %s.'
+ % (in_tested, self.mysite.user(), self.mysite))
+
self.mysite.version = lambda: test_version
+
for ttype in ("edit", "move", additional_token):
try:
token = self.mysite.tokens[ttype]
--
To view, visit https://gerrit.wikimedia.org/r/181883
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2bb23452880ce624c382bf7b5b8929a64f7e5fb7
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Maverick <manpreetkaur9411(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Maverick <manpreetkaur9411(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>