Page MenuHomePhabricator

deletedrevs deprecated
Closed, ResolvedPublicBUG REPORT

Description

In MediaWiki 1.25 there was an API change announced:

list=deletedrevs becomes list=alldeletedrevisions
prop=deletedrevs becomes prop=deletedrevisions

http://git.wikimedia.org/blobdiff/mediawiki%2Fcore.git/991de897e4781597f60a9c19d84df740a2b68ed1/includes%2Fapi%2FApiQueryDeletedrevs.php

APISite.deletedrevs uses API deletedrevs. This should use list alldeletedrevisions or prop deletedrevisions on 1.25+ (See APISite.version). The version test could be more specific. i.e. if it was released in 1.25wmf7 (as announced, but may not be reality), that can be used as the version test.

pywikibot/data/api.py includes a TODO which can be removed when this is completed.

See also T74733: Implement site.undelete.

Details

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:55 AM
bzimport set Reference to bz73370.
bzimport added a subscriber: Unknown Object (????).
jayvdb removed a project: Pywikibot-General.
jayvdb set Security to None.
AndyTechGuy subscribed.

I have claimed this task on the GCI website.

I have claimed this task on GCI.

See the README in the tests/ directory

Xqt removed a project: Google-Code-In-2015.
Xqt raised the priority of this task from Low to High.Sep 19 2019, 4:12 AM

Change 538006 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] Implement alldeletedrevisions api call

https://gerrit.wikimedia.org/r/538006

The result of deletedrevs ListGenerator and deletedrevisions PropertyGenerator is different.

ListGenerator:

{'ns': 0,
 'revisions': [{'comment': 'Framawiki moved page [[Pywikibot bad token test]] '
                           'to [[User:Framawiki/pwb tests/bad token]]: move to '

                           'user namespace to avoid deletion for page '
                           'inactivity',
                'parentid': 0,
                'revid': 341153,
                'timestamp': '2017-12-29T15:09:29Z',
                'user': 'Framawiki'}],
 'title': 'Pywikibot bad token test'}

PropertyGenerator:

{'deletedrevisions': [{'comment': 'Framawiki moved page [[Pywikibot bad token '
                                  'test]] to [[User:Framawiki/pwb tests/bad '
                                  'token]]: move to user namespace to avoid '
                                  'deletion for page inactivity',
                       'parentid': 0,
                       'revid': 341153,
                       'timestamp': '2017-12-29T15:09:29Z',
                       'user': 'Framawiki'}],
 'ns': 0,
 'pageid': 81035,
 'title': 'Pywikibot bad token test'}
Xqt changed the subtype of this task from "Task" to "Bug Report".Sep 23 2019, 4:19 PM
Huji removed a project: Patch-For-Review.

Change 538006 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Implement deletedrevisions api call

https://gerrit.wikimedia.org/r/538006