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 21
21
import heapq as _heapq
22
22
from _weakref import proxy as _proxy
23
23
from itertools import repeat as _repeat , chain as _chain , starmap as _starmap
24
-
24
+ from socket import getaddrinfo , SOCK_STREAM , error , socket
25
25
26
26
from future .utils import iteritems , itervalues , PY26 , PY3
27
27
@@ -39,10 +39,18 @@ def ceil(x):
39
39
########################################################################
40
40
41
41
from 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
+
46
54
47
55
def recursive_repr (fillvalue = '...' ):
48
56
'Decorator to make a repr function return fillvalue for a recursive call'
You can’t perform that action at this time.
0 commit comments