jenkins-bot has submitted this change and it was merged.
Change subject: mw version 1.23wmf15
......................................................................
mw version 1.23wmf15
Change-Id: I2edcf460eee1b664fb38ee803e6670118bee0897
---
M pywikibot/family.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/family.py b/pywikibot/family.py
index da92ada..70619c3 100644
--- a/pywikibot/family.py
+++ b/pywikibot/family.py
@@ -1065,7 +1065,7 @@
"""Return Wikimedia projects version number as a string."""
# Don't use this, use versionnumber() instead. This only exists
# to not break family files.
- return '1.23wmf14'
+ return '1.23wmf15'
def shared_image_repository(self, code):
return ('commons', 'commons')
--
To view, visit https://gerrit.wikimedia.org/r/116231
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2edcf460eee1b664fb38ee803e6670118bee0897
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
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: Make Recentchanges be able to return all revisions
......................................................................
Make Recentchanges be able to return all revisions
Recentchanges() is supposed to be able to return all revisions.
This patch therefore adds a parameter to return all revisions.
The default value for this parameter, however, is to return distinct
pages, in order to keep backward-compatibility.
Bug: 55152
Change-Id: I958be12e1a197a00e197f0746c7ee47960fb952e
---
M wikipedia.py
1 file changed, 11 insertions(+), 3 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/wikipedia.py b/wikipedia.py
index 45880cc..d431990 100644
--- a/wikipedia.py
+++ b/wikipedia.py
@@ -8155,7 +8155,7 @@
def recentchanges(self, number=100, rcstart=None, rcend=None, rcshow=None,
rcdir='older', rctype='edit|new', namespace=None,
includeredirects=True, repeat=False, user=None,
- returndict=False, nobots=False):
+ returndict=False, nobots=False, revision=False):
"""
Yield recent changes as Page objects
uses API call:
@@ -8200,6 +8200,9 @@
timestamp (unicode), length (int), an empty unicode string, username
or IP address (str), comment (unicode).
+ If parameter revision is true, this function returns distinct
+ revisions. If false, it returns only distinct pages.
+
# TODO: Detection of unregistered users is broken
"""
if rctype is None:
@@ -8231,6 +8234,11 @@
if rctype:
params['rctype'] = rctype
+ if revision:
+ keyseen = 'revid'
+ else:
+ keyseen = 'pageid'
+
seen = set()
while True:
data = query.GetData(params, self)
@@ -8243,8 +8251,8 @@
"The APIs don't return data, the site may be down")
for i in rcData:
- if i['pageid'] not in seen:
- seen.add(i['pageid'])
+ if i[keyseen] not in seen:
+ seen.add(i[keyseen])
page = Page(self, i['title'], defaultNamespace=i['ns'])
if 'comment' in i:
page._comment = i['comment']
--
To view, visit https://gerrit.wikimedia.org/r/116218
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I958be12e1a197a00e197f0746c7ee47960fb952e
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Nullzero <nullzero.free(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>