File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 20
20
21
21
import base64
22
22
import binascii
23
- import collections
23
+ import collections . abc
24
24
import datetime
25
25
import json
26
26
import threading
@@ -74,7 +74,7 @@ def expr(val, nesting_depth=20):
74
74
75
75
if isinstance (val , RqlQuery ):
76
76
return val
77
- elif isinstance (val , collections .Callable ):
77
+ elif isinstance (val , collections .abc . Callable ):
78
78
return Func (val )
79
79
elif isinstance (val , (datetime .datetime , datetime .date )):
80
80
if not hasattr (val , "tzinfo" ) or not val .tzinfo :
@@ -95,14 +95,14 @@ def expr(val, nesting_depth=20):
95
95
return Datum (val )
96
96
elif isinstance (val , bytes ):
97
97
return Binary (val )
98
- elif isinstance (val , collections .Mapping ):
98
+ elif isinstance (val , collections .abc . Mapping ):
99
99
# MakeObj doesn't take the dict as a keyword args to avoid
100
100
# conflicting with the `self` parameter.
101
101
obj = {}
102
102
for k , v in dict_items (val ):
103
103
obj [k ] = expr (v , nesting_depth - 1 )
104
104
return MakeObj (obj )
105
- elif isinstance (val , collections .Iterable ):
105
+ elif isinstance (val , collections .abc . Iterable ):
106
106
val = [expr (v , nesting_depth - 1 ) for v in val ]
107
107
return MakeArray (* val )
108
108
else :
You can’t perform that action at this time.
0 commit comments