File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 2121import heapq as _heapq
2222from _weakref import proxy as _proxy
2323from itertools import repeat as _repeat , chain as _chain , starmap as _starmap
24-
24+ from socket import getaddrinfo , SOCK_STREAM , error , socket
2525
2626from future .utils import iteritems , itervalues , PY26 , PY3
2727
@@ -39,10 +39,18 @@ def ceil(x):
3939########################################################################
4040
4141from itertools import islice
42- try :
43- from _thread import get_ident
44- except ImportError :
45- from _dummy_thread import get_ident
42+
43+ if PY3 :
44+ try :
45+ from _thread import get_ident
46+ except ImportError :
47+ from _dummy_thread import get_ident
48+ else :
49+ try :
50+ from thread import get_ident
51+ except ImportError :
52+ from dummy_thread import get_ident
53+
4654
4755def recursive_repr (fillvalue = '...' ):
4856 'Decorator to make a repr function return fillvalue for a recursive call'
You can’t perform that action at this time.
0 commit comments