[compat] Introduce compat_integer_types

This commit is contained in:
Sergey M․ 2018-06-18 03:22:08 +07:00
parent 8ba84e4600
commit 075a13d3e9
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -2787,6 +2787,12 @@ def compat_kwargs(kwargs):
compat_numeric_types = (int, float, complex)
try:
compat_integer_types = (int, long)
except NameError: # Python 3
compat_integer_types = (int, )
if sys.version_info < (2, 7):
def compat_socket_create_connection(address, timeout, source_address=None):
host, port = address
@ -2974,6 +2980,7 @@ def compat_ctypes_WINFUNCTYPE(*args, **kwargs):
'compat_http_client',
'compat_http_server',
'compat_input',
'compat_integer_types',
'compat_itertools_count',
'compat_kwargs',
'compat_numeric_types',