jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/683887 )
Change subject: [cleanup] PageInUse error is already published by ModuleDeprecationWrapper ......................................................................
[cleanup] PageInUse error is already published by ModuleDeprecationWrapper
Also remove PageInUse replacements inside private _basesite module
Change-Id: I8a77a3822838dc127dadb32eff72e84348dec776 --- M pywikibot/site/__init__.py M pywikibot/site/_basesite.py 2 files changed, 1 insertion(+), 15 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site/__init__.py b/pywikibot/site/__init__.py index 0065402..d4cd3ea 100644 --- a/pywikibot/site/__init__.py +++ b/pywikibot/site/__init__.py @@ -11,12 +11,9 @@ from pywikibot.site._obsoletesites import ClosedSite, RemovedSite from pywikibot.site._siteinfo import Siteinfo from pywikibot.site._tokenwallet import TokenWallet -from pywikibot.tools import ModuleDeprecationWrapper, suppress_warnings +from pywikibot.tools import ModuleDeprecationWrapper
-with suppress_warnings(category=FutureWarning): - from pywikibot.site._basesite import PageInUse - __all__ = ('APISite', 'BaseSite', 'ClosedSite', 'DataSite', 'RemovedSite', 'Namespace', 'NamespacesDict', 'PageInUse', 'Siteinfo', 'TokenWallet') diff --git a/pywikibot/site/_basesite.py b/pywikibot/site/_basesite.py index e84cbef..a1c8a55 100644 --- a/pywikibot/site/_basesite.py +++ b/pywikibot/site/_basesite.py @@ -21,7 +21,6 @@ from pywikibot.throttle import Throttle from pywikibot.tools import ( ComparableMixin, - ModuleDeprecationWrapper, SelfCallString, deprecated, first_upper, @@ -456,13 +455,3 @@ def getSite(self, code): # noqa: N802 """Return Site object for language 'code' in this Family.""" return pywikibot.Site(code=code, fam=self.family, user=self.user()) - - -PageInUse = PageInUseError - -wrapper = ModuleDeprecationWrapper(__name__) -wrapper._add_deprecated_attr( - 'PageInUse', - replacement_name='pywikibot.exceptions.PageInUseError', - since='20210423', - future_warning=True)
pywikibot-commits@lists.wikimedia.org