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

Reference
bz73370

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:55 AM
bzimport added a project: Pywikibot-General.
bzimport set Reference to bz73370.
bzimport added a subscriber: Unknown Object (????).
jayvdb created this task.Nov 13 2014, 3:00 PM
jayvdb updated the task description. (Show Details)Dec 9 2015, 2:27 PM
jayvdb removed a project: Pywikibot-General.
jayvdb set Security to None.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 9 2015, 2:27 PM
AndyTechGuy added a subscriber: AndyTechGuy.

I have claimed this task on the GCI website.

AndyTechGuy removed AndyTechGuy as the assignee of this task.Jan 13 2016, 8:28 PM
This comment was removed by IoannisKydonis.

I have claimed this task on GCI.

How can i run a test?

See the README in the tests/ directory

Xqt removed IoannisKydonis as the assignee of this task.Apr 24 2017, 1:52 PM
Xqt removed a project: Google-Code-In-2015.
Xqt raised the priority of this task from Low to High.Thu, Sep 19, 4:12 AM
Xqt claimed this task.Thu, Sep 19, 4:39 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

Xqt added a subscriber: Anomie.Thu, Sep 19, 12:31 PM
Xqt added a comment.Mon, Sep 23, 12:44 PM

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".Mon, Sep 23, 4:19 PM
Huji closed this task as Resolved.Tue, Sep 24, 12:49 AM
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