jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/691963 )
Change subject: [bugfix] lazy load tools for deprecation warning to avoid circular imports ......................................................................
[bugfix] lazy load tools for deprecation warning to avoid circular imports
Bug: T282974 Change-Id: Ie41cc3c87c435fa319196cfa288802b9e2a58c8b --- M pywikibot/page/__init__.py 1 file changed, 8 insertions(+), 6 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/page/__init__.py b/pywikibot/page/__init__.py index 6ddfc9d..9c3a1b3 100644 --- a/pywikibot/page/__init__.py +++ b/pywikibot/page/__init__.py @@ -5760,9 +5760,11 @@
wrapper = ModuleDeprecationWrapper(__name__) -wrapper._add_deprecated_attr('UnicodeToAsciiHtml', - pywikibot.tools.chars.string_to_ascii_html, - since='6.2.0', future_warning=True) -wrapper._add_deprecated_attr('unicode2html', - pywikibot.tools.chars.string2html, - since='6.2.0', future_warning=True) +wrapper._add_deprecated_attr( + 'UnicodeToAsciiHtml', + replacement_name='pywikibot.tools.chars.string_to_ascii_html', + since='6.2.0', future_warning=True) +wrapper._add_deprecated_attr( + 'unicode2html', + replacement_name='pywikibot.tools.chars.string2html', + since='6.2.0', future_warning=True)
pywikibot-commits@lists.wikimedia.org