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
-(a)deprecated('difflib._format_range_unified'ied', since='20160111')
+(a)deprecated('difflib._format_range_unified'ied', 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)
-(a)deprecated('logging.NullHandler'ler', since='20160111')
+(a)deprecated('logging.NullHandler'ler', since='20160111',
future_warning=True)
class NullHandler(logging.NullHandler):
"""This handler does nothing."""
@@ -37,7 +38,7 @@
pass
-(a)deprecated('logging.captureWarnings'ngs', since='20160111')
+(a)deprecated('logging.captureWarnings'ngs', since='20160111',
future_warning=True)
def captureWarnings(capture):
"""
Capture warnings into logging.
--
To view, visit
https://gerrit.wikimedia.org/r/571074
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I59cb34bd43a0845751e3e8c6c47b17e813d2bd5e
Gerrit-Change-Number: 571074
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: jenkins-bot (75)