jenkins-bot has submitted this change and it was merged.
Change subject: Deprecate everything in compat.catlib and compat.userlib ......................................................................
Deprecate everything in compat.catlib and compat.userlib
Id est: * compat.catlib.Category * compat.catlib.change_category() * compat.userlib.User
The 'compat' submodule was never meant for direct use, but a real deprecation notice has never been added. Since replacing them with their 'core' equivalents is a no-brainer, they will be removed quite soon.
Change-Id: Iaa29035d8f645724c4a5d09d90e64e03f2823f9a --- M pywikibot/compat/catlib.py M pywikibot/compat/userlib.py 2 files changed, 9 insertions(+), 0 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved XZise: Looks good to me, but someone else must approve jenkins-bot: Verified
diff --git a/pywikibot/compat/catlib.py b/pywikibot/compat/catlib.py index 985f6af..d4f7b48 100644 --- a/pywikibot/compat/catlib.py +++ b/pywikibot/compat/catlib.py @@ -15,6 +15,7 @@
from pywikibot import Category +from pywikibot.tools import ModuleDeprecationWrapper
def change_category(article, oldCat, newCat, comment=None, sortKey=None, @@ -22,3 +23,7 @@ return article.change_category(oldCat, newCat, comment, sortKey, inPlace)
__all__ = ('Category', 'change_category',) + +wrapper = ModuleDeprecationWrapper(__name__) +wrapper._add_deprecated_attr('Category', replacement_name='pywikibot.Category') +wrapper._add_deprecated_attr('change_category', replacement_name='Page.change_category') diff --git a/pywikibot/compat/userlib.py b/pywikibot/compat/userlib.py index 7150992..4c999c7 100644 --- a/pywikibot/compat/userlib.py +++ b/pywikibot/compat/userlib.py @@ -15,5 +15,9 @@
from pywikibot import User +from pywikibot.tools import ModuleDeprecationWrapper
__all__ = ('User',) + +wrapper = ModuleDeprecationWrapper(__name__) +wrapper._add_deprecated_attr('User', replacement_name='pywikibot.User')