jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/571074 )
Change subject: [cleanup] Throw FutureWarning with backports.py functions ......................................................................
[cleanup] Throw FutureWarning with backports.py functions
Bug: T244664 Change-Id: I59cb34bd43a0845751e3e8c6c47b17e813d2bd5e --- M HISTORY.rst M pywikibot/backports.py 2 files changed, 6 insertions(+), 4 deletions(-)
Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
diff --git a/HISTORY.rst b/HISTORY.rst index c9f0dfc..05fdd57 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,7 @@ Current release ---------------
+* backports.py will be removed with next release (T244664) * stdnum package is required for ISBN scripts and cosmetic_changes (T132919, T144288, T241141) * preload urllib.quote() with Python 2 (T243710, T222623) * Drop isbn_hyphenate package due to outdated data (T243157) diff --git a/pywikibot/backports.py b/pywikibot/backports.py index a190eba..59bc5f5 100644 --- a/pywikibot/backports.py +++ b/pywikibot/backports.py @@ -5,7 +5,7 @@ Their usage is deprecated and this module could be dropped soon. """ # -# (C) Pywikibot team, 2014-2018 +# (C) Pywikibot team, 2014-2020 # # Distributed under the terms of the MIT license. # @@ -18,7 +18,8 @@ from pywikibot.tools import deprecated
-@deprecated('difflib._format_range_unified', since='20160111') +@deprecated('difflib._format_range_unified', since='20160111', + future_warning=True) def format_range_unified(start, stop): """ Convert range to the "ed" format. @@ -29,7 +30,7 @@ return _format_range_unified(start, stop)
-@deprecated('logging.NullHandler', since='20160111') +@deprecated('logging.NullHandler', since='20160111', future_warning=True) class NullHandler(logging.NullHandler):
"""This handler does nothing.""" @@ -37,7 +38,7 @@ pass
-@deprecated('logging.captureWarnings', since='20160111') +@deprecated('logging.captureWarnings', since='20160111', future_warning=True) def captureWarnings(capture): """ Capture warnings into logging.
pywikibot-commits@lists.wikimedia.org