jenkins-bot has submitted this change and it was merged.
Change subject: move catlib to pywikibot.compat ......................................................................
move catlib to pywikibot.compat
compat folder contains compatibility libraries from compat like query. catlib is part of page.py and the library should also placed here.
Change-Id: Ia00e2a96f906575eea27d55222ddd3b3e3abad10 --- M README-conversion.txt R pywikibot/compat/catlib.py M scripts/category.py 3 files changed, 5 insertions(+), 4 deletions(-)
Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified
diff --git a/README-conversion.txt b/README-conversion.txt index c3c69cb..f70e7f2 100644 --- a/README-conversion.txt +++ b/README-conversion.txt @@ -28,7 +28,8 @@ change "import wikipedia" to "import pywikibot" change "import pagegenerators" to "from pywikibot import pagegenerators" change "import config" to "from pywikibot import config" - change "import catlib" to "from pywikibot import catlib" + change "import catlib" to "from pywikibot.compat import catlib" + change "import query" to "from pywikibot.compat import query" change "wikipedia." to "pywikibot."
wikipedia.setAction() no longer works; you must revise the script to pass an diff --git a/pywikibot/catlib.py b/pywikibot/compat/catlib.py similarity index 100% rename from pywikibot/catlib.py rename to pywikibot/compat/catlib.py diff --git a/scripts/category.py b/scripts/category.py index 3f31054..23ad47d 100755 --- a/scripts/category.py +++ b/scripts/category.py @@ -104,7 +104,7 @@ import pickle import bz2 import pywikibot -from pywikibot import catlib, config, pagegenerators +from pywikibot import config, pagegenerators from pywikibot import i18n from pywikibot import deprecate_arg
@@ -786,8 +786,8 @@ elif choice in ['j', 'J']: newCatTitle = pywikibot.input(u'Please enter the category the ' u'article should be moved to:') - newCat = catlib.Category(pywikibot.Link('Category:' + - newCatTitle)) + newCat = pywikibot.Category(pywikibot.Link('Category:' + + newCatTitle)) # recurse into chosen category self.move_to_category(article, original_cat, newCat) flag = True
pywikibot-commits@lists.wikimedia.org