diff --git a/pyschema.py b/pyschema.py index 134d159..8557c37 100644 --- a/pyschema.py +++ b/pyschema.py @@ -113,7 +113,7 @@ def _execute_if_necessary(self, code_like, expected_type): executed = True if callable(code_like): ret_value = code_like() - elif isinstance(code_like, basestring): + elif isinstance(code_like, str): try: ret_value = eval(code_like) except: @@ -235,7 +235,7 @@ def create_schema_node(level, schema_dict): # We must have consumed every key in the dictionary if len(schema_dict) > 0: raise SchemaError('Invalid entries (%s) in schema at level %s for type %s' % - (','.join(schema_dict.keys()), level, node_type)) + (','.join(list(schema_dict.keys())), level, node_type)) # Return the schema node return schema_node diff --git a/setup.py b/setup.py index d666ca8..f1a5b5c 100644 --- a/setup.py +++ b/setup.py @@ -5,4 +5,5 @@ description="Aviso Schema", author="Eswar Vandanapu", url="https://github.com/gnanarepo/py-schema", -) \ No newline at end of file + py_modules=[] +)