jenkins-bot merged this change.

View Change

Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
[cleanup] remove Python 2.6 backports

As already announced remove the Python 2.6 backports.py

Bug: T244664
Change-Id: Id29bbaf46f52fbe0d21ad7e2b6dd717a2b5bc56e
---
M .codecov.yml
M HISTORY.rst
M pywikibot/CONTENT.rst
D pywikibot/backports.py
M tox.ini
5 files changed, 1 insertion(+), 54 deletions(-)

diff --git a/.codecov.yml b/.codecov.yml
index b454e15..c151d9d 100644
--- a/.codecov.yml
+++ b/.codecov.yml
@@ -15,7 +15,6 @@

ignore:
- pywikibot/compat
- - pywikibot/backports.py
- pywikibot/data/mysql.py
- pywikibot/families/__init__.py
- scripts/archive
diff --git a/HISTORY.rst b/HISTORY.rst
index 2bb2114..365fff0 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -4,6 +4,7 @@
Current release
---------------

+* backports.py has been removed (T244664)
* Site.has_api method has been removed (T106121)
* Bugfixes and improvements
* Localisation updates
diff --git a/pywikibot/CONTENT.rst b/pywikibot/CONTENT.rst
index 213ec41..3ea540f 100644
--- a/pywikibot/CONTENT.rst
+++ b/pywikibot/CONTENT.rst
@@ -9,9 +9,6 @@
+----------------------------+------------------------------------------------------+
| _wbtypes.py | Wikibase data type classes |
+----------------------------+------------------------------------------------------+
- | backports.py | Deprecated module that contained backports to support|
- | | older Python versions (could be dropped soon) |
- +----------------------------+------------------------------------------------------+
| bot.py | User-interface related functions for building bots |
+----------------------------+------------------------------------------------------+
| bot_choice.py | Classes for input_choice |
diff --git a/pywikibot/backports.py b/pywikibot/backports.py
deleted file mode 100644
index 59bc5f5..0000000
--- a/pywikibot/backports.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
-This module contained backports to support older Python versions.
-
-Their usage is deprecated and this module could be dropped soon.
-"""
-#
-# (C) Pywikibot team, 2014-2020
-#
-# Distributed under the terms of the MIT license.
-#
-
-from __future__ import absolute_import, division, unicode_literals
-
-from difflib import _format_range_unified
-import logging
-
-from pywikibot.tools import deprecated
-
-
-@deprecated('difflib._format_range_unified', since='20160111',
- future_warning=True)
-def format_range_unified(start, stop):
- """
- Convert range to the "ed" format.
-
- DEPRECATED (Python 2.6 backport).
- Use difflib._format_range_unified instead.
- """
- return _format_range_unified(start, stop)
-
-
-@deprecated('logging.NullHandler', since='20160111', future_warning=True)
-class NullHandler(logging.NullHandler):
-
- """This handler does nothing."""
-
- pass
-
-
-@deprecated('logging.captureWarnings', since='20160111', future_warning=True)
-def captureWarnings(capture):
- """
- Capture warnings into logging.
-
- DEPRECATED (Python 2.6 backport).
- Use logging.captureWarnings instead.
- """
- logging.captureWarnings(capture)
diff --git a/tox.ini b/tox.ini
index e11c674..ff5de6c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -120,7 +120,6 @@
# pydocstyle cannot handle multiple __all__ variables
pywikibot/__init__.py : N802, N806, N815, N816
pywikibot/_wbtypes.py: N802
- pywikibot/backports.py: N802
pywikibot/bot.py: N802, N815, N816
pywikibot/compat/__init__.py: FI10, FI11, FI14
pywikibot/compat/catlib.py : N803

To view, visit change 577593. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id29bbaf46f52fbe0d21ad7e2b6dd717a2b5bc56e
Gerrit-Change-Number: 577593
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)