GSoC/GCI Archive
Google Code-in 2014 Wikimedia Foundation

Pywikibot: Reimplement undelete

completed by: ☃ unicodesnowman

mentors: Fabian, John Vandenberg

Pywikibot (PWB) is a Python-based framework to write bots for MediaWiki. See for more information. Patches can be submitted via Gerrit (you need a account). More documentation on Gerrit can be found at 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 and the #pywikibot IRC channel (see

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 .

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/" to verify the Site deletion and undeletion API works correctly, and a unit test needs to be added to "tests/" to verify the Page deletion and undeletion API works correctly, and new unit test module "tests/" needs to be created to test the command line interface "scripts/" works correctly.

The Phabricator task is . 

Always refer to for general information and for information on specific tasks.