jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1041059?usp=email )
Change subject: [tests] test alldeletedrevisions tests ......................................................................
[tests] test alldeletedrevisions tests
'user' keyword must be given with 'start' or 'end', see https://www.mediawiki.org/wiki/API:Alldeletedrevisions
Change-Id: Ifc691162a360ce00ab8785b483f376199ed3f139 --- M pywikibot/site/_generators.py M tests/site_tests.py 2 files changed, 15 insertions(+), 9 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site/_generators.py b/pywikibot/site/_generators.py index af2aa43..4544e8c 100644 --- a/pywikibot/site/_generators.py +++ b/pywikibot/site/_generators.py @@ -1795,22 +1795,26 @@ Yield all deleted revisions.
.. seealso:: :api:`Alldeletedrevisions` + .. warning:: *user* keyword argument must be given together with + *start* or *end*.
:param namespaces: Only iterate pages in these namespaces :param reverse: Iterate oldest revisions first (default: newest) :param content: If True, retrieve the content of each revision :param total: Number of revisions to retrieve - :keyword from: Start listing at this title - :keyword to: Stop listing at this title - :keyword prefix: Search for all page titles that begin with this value - :keyword excludeuser: Exclude revisions by this user - :keyword tag: Only list revisions tagged with this tag - :keyword user: List revisions by this user + + :keyword str from: Start listing at this title + :keyword str to: Stop listing at this title + :keyword str prefix: Search for all page titles that begin with this + value + :keyword str excludeuser: Exclude revisions by this user + :keyword str tag: Only list revisions tagged with this tag + :keyword str user: List revisions by this user :keyword start: Iterate revisions starting at this Timestamp :keyword end: Iterate revisions ending at this Timestamp - :keyword prop: Which properties to get. Defaults are ids, timestamp, - flags, user, and comment (if you have the right to view). - :type prop: list[str] + :keyword list[str] prop: Which properties to get. Defaults are + ``ids``, ``timestamp``, ``flags``, ``user``, and ``comment`` + (if the bot has the right to view). """ if 'start' in kwargs and 'end' in kwargs: self.assert_valid_iter_params('alldeletedrevisions', diff --git a/tests/site_tests.py b/tests/site_tests.py index 9014d0e..3933ae2 100755 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -506,6 +506,7 @@ prop=prop): for item in mysite.alldeletedrevisions( start='2008-10-11T01:02:03Z', + user=myuser, total=5 ): for drev in item['revisions']: @@ -517,6 +518,7 @@ prop=prop): for item in mysite.alldeletedrevisions( start='2008-10-11T01:02:03Z', + user=myuser, total=5 ): for drev in item['revisions']:
pywikibot-commits@lists.wikimedia.org