HomePhabricator

[bugfix] Implement deletedrevisions api call

Description

[bugfix] Implement deletedrevisions api call

deletedrevs is deprecated and might be removed.

site changes:

  • With mw 1.25 a 'deletedrevisions' PropertyGenerator is used to get deleted revisions.
  • All API parameters can be used as keyword options
  • The revids parameter is available too.
  • page was renamed to titles. Both titles and revids are allowed to be an iterable instead of a single item
  • All properties can be set with prop parameter if others than the default properties should be shown. If the content of a revision is requested, this will be added to the given properties or added to the default.
  • Fallback to 'deletedrevs' ListGenerator for mw_version prior than 1.25
  • Take into account that the two request types have different dicts

Test changes:

  • Replace "page" with "titles"
  • Use subTest to separate tests inside test method
  • The generator must be started to validate the AssertionError since we have a real generator instead an iterable

Bug: T75370
Change-Id: I4c47abbc9ba0fcb03c20bcd4486020ac829a5b2b

Details

Provenance
XqtAuthored on Sep 20 2019, 10:48 AM
Parents
rPWBCe321cbc82007: [tests] Test for AssertionError instead of pywikibot.Error
Branches
Unknown
Tags
Unknown
ChangeId
I4c47abbc9ba0fcb03c20bcd4486020ac829a5b2b