[PR #9496/43d5d6e2 backport][stable-10] remove code handling unsupported Python versions (#9502)

remove code handling unsupported Python versions (#9496)

* remove code handling unsupported Python versions

* drop unused import

* remove no longer needed ignore lines

(cherry picked from commit 43d5d6e2ce)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2024-12-31 10:46:15 +01:00 committed by GitHub
commit f99508b307
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 1 additions and 99 deletions

View file

@ -10,16 +10,7 @@ __metaclass__ = type
Compat module for Python2.7's unittest module
'''
import sys
# Allow wildcard import because we really do want to import all of
# unittests's symbols into this compat shim
# pylint: disable=wildcard-import,unused-wildcard-import
if sys.version_info < (2, 7):
try:
# Need unittest2 on python2.6
from unittest2 import * # noqa: F401, pylint: disable=unused-import
except ImportError:
print('You need unittest2 installed on python2.6.x to run tests')
else:
from unittest import * # noqa: F401, pylint: disable=unused-import
from unittest import * # noqa: F401, pylint: disable=unused-import