##// END OF EJS Templates
Fix references to deprecated objects in the types module...
Thomas Kluyver -
Show More
@@ -184,7 +184,7 b' def json_clean(obj):'
184 """
184 """
185 # types that are 'atomic' and ok in json as-is. bool doesn't need to be
185 # types that are 'atomic' and ok in json as-is. bool doesn't need to be
186 # listed explicitly because bools pass as int instances
186 # listed explicitly because bools pass as int instances
187 atomic_ok = (unicode_type, int, types.NoneType)
187 atomic_ok = (unicode_type, int, type(None))
188
188
189 # containers that we need to convert into lists
189 # containers that we need to convert into lists
190 container_to_list = (tuple, set, types.GeneratorType)
190 container_to_list = (tuple, set, types.GeneratorType)
@@ -44,7 +44,7 b' def is_type(obj, typestr_or_type):'
44 TODO: Should be extended for choosing more than one type."""
44 TODO: Should be extended for choosing more than one type."""
45 if typestr_or_type == "all":
45 if typestr_or_type == "all":
46 return True
46 return True
47 if type(typestr_or_type) == types.TypeType:
47 if type(typestr_or_type) == type:
48 test_type = typestr_or_type
48 test_type = typestr_or_type
49 else:
49 else:
50 test_type = typestr2type.get(typestr_or_type, False)
50 test_type = typestr2type.get(typestr_or_type, False)
General Comments 0
You need to be logged in to leave comments. Login now