jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/668365 )
Change subject: [cleanup] remove deprecated tools.PY2 ......................................................................
[cleanup] remove deprecated tools.PY2
Change-Id: I5f28a006d07d7192f43d21ffa8e8fcafe3f024a2 --- M pywikibot/tools/__init__.py 1 file changed, 1 insertion(+), 9 deletions(-)
Approvals: Matěj Suchánek: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py index 829a4f9..2f4cc1d 100644 --- a/pywikibot/tools/__init__.py +++ b/pywikibot/tools/__init__.py @@ -1,6 +1,6 @@ """Miscellaneous helper functions (not wiki-dependent).""" # -# (C) Pywikibot team, 2008-2020 +# (C) Pywikibot team, 2008-2021 # # Distributed under the terms of the MIT license. # @@ -1821,15 +1821,7 @@ return '{} ({}):'.format(message, option_msg)
-def _py2(): - """Function for deprecated PY2 variable used by wrapper below.""" - return (PYTHON_VERSION[0] == 2) - - wrapper = ModuleDeprecationWrapper(__name__) wrapper._add_deprecated_attr('FrozenDict', _FrozenDict, replacement_name='tools.frozenmap', since='20201109', future_warning=True) -wrapper._add_deprecated_attr('PY2', _py2(), - replacement_name='sys.version_info[0] == 2', - since='20201224', future_warning=True)