-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop support for Python 2.7, 3.5, 3.6, 3.7
- Loading branch information
Showing
22 changed files
with
76 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,8 @@ | ||
"""Compatibility support of testing tools for different Python versions""" | ||
# The required modules are installed as necessary for different Python | ||
# versions by `tox`. See `tox.ini` for details. | ||
import sys | ||
|
||
__all__ = [ | ||
'b', | ||
'mock', | ||
'u', | ||
'unittest', | ||
] | ||
|
||
# The `unittest2` module is a backport of the new unittest features introduced | ||
# in Python versions 3.2 and 2.7. Use it in older versions of Python. | ||
# It is also used here in versions 2.7, 3.2 and 3.3 to make features added | ||
# in version 3.4 available (specifically, TestCase.subTest). | ||
if sys.version_info < (3, 4): | ||
import unittest2 as unittest | ||
else: | ||
import unittest | ||
|
||
# The `mock` module was added to the stdlib as `unittest.mock` in Python | ||
# version 3.3. | ||
if sys.version_info < (3, 3): | ||
import mock | ||
else: | ||
import unittest.mock as mock | ||
|
||
if sys.version_info < (3,): | ||
def b(x): | ||
return x | ||
|
||
def u(x): | ||
return unicode(x.replace(r'\\', r'\\\\'), 'unicode_escape') | ||
else: | ||
def b(x): | ||
return x.encode('latin-1') | ||
|
||
def u(x): | ||
return x | ||
def b(x): | ||
return x.encode('latin-1') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.