Pywikibot: Reimplement undelete
completed by: ☃ unicodesnowman
mentors: Fabian, John Vandenberg
Pywikibot (PWB) is a Python-based framework to write bots for MediaWiki. See https://www.mediawiki.org/wiki/Manual:Pywikibot for more information. Patches can be submitted via Gerrit (you need a MediaWiki.org account). More documentation on Gerrit can be found at https://www.mediawiki.org/wiki/Manual:Pywikibot/Gerrit. After you have successfully claimed this task in Google Melange please do use the task in Phabricator for communication instead of Google Melange. This allows more PWB developers to be reached! General development questions can be asked on the Pywikibot mailing list at https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l and the #pywikibot IRC channel (see https://www.mediawiki.org/wiki/MediaWiki_on_IRC).
Pywikibot is undergoing a rewrite which will be released as version 2.0, also called 'core'. The majority of the code rewrite has been completed, and beta releases of the rewrite are functional and used by many bot operators on production wikis. However some functionality from the old codebase has not been ported to the new codebase, which means Pywikibot users occasionally need to use the old codebase for some tasks. The old codebase (called 'compat') can be found at http://git.wikimedia.org/summary/pywikibot%2Fcompat.git .
This task is to re-implement Page undeletion from the 'compat' codebase into the 'core' codebase, trying to maintain API compatibility where possible. Skeleton code exists in APISite.undelete and Page.undelete. To complete this task, a unit test needs to be added to "tests/site_tests.py" to verify the Site deletion and undeletion API works correctly, and a unit test needs to be added to "tests/page_tests.py" to verify the Page deletion and undeletion API works correctly, and new unit test module "tests/deletionbot_tests.py" needs to be created to test the command line interface "scripts/delete.py" works correctly.
The Phabricator task is https://phabricator.wikimedia.org/T74733 .
Always refer to https://www.mediawiki.org/wiki/Google_Code-in_2014#Instructions_for_GCI_students for general information and phabricator.wikimedia.org for information on specific tasks.