Skip to content

Commit

Permalink
Copying metadata to be backwards compatible was a mistake. (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
tetron authored Jan 30, 2019
1 parent de17ca0 commit cb3177c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ COVBASE=coverage run --branch --append --source=${MODULE} \

# Updating the Major & Minor version below?
# Don't forget to update setup.py as well
VERSION=3.2.$(shell date +%Y%m%d%H%M%S --utc --date=`git log --first-parent \
VERSION=4.0.$(shell date +%Y%m%d%H%M%S --utc --date=`git log --first-parent \
--max-count=1 --format=format:%cI`)

## all : default task
Expand Down
8 changes: 4 additions & 4 deletions schema_salad/ref_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ def resolve_ref(self,
metadata = _copy_dict_without_key(resolved_obj, u"$graph")
return resolved_obj[u"$graph"], metadata
else:
return resolved_obj, copy.copy(metadata)
return resolved_obj, metadata
else:
raise ValueError(u"Expected CommentedMap, got %s: `%s`"
% (type(metadata), Text(metadata)))
Expand Down Expand Up @@ -643,9 +643,9 @@ def resolve_ref(self,
metadata = _copy_dict_without_key(resolved_obj, u"$graph")
return resolved_obj[u"$graph"], metadata
else:
return resolved_obj, copy.copy(metadata)
return resolved_obj, metadata
else:
return resolved_obj, copy.copy(metadata)
return resolved_obj, metadata

def _resolve_idmap(self,
document, # type: CommentedMap
Expand Down Expand Up @@ -999,7 +999,7 @@ def resolve_all(self,
loader.validate_links(document, u"", all_doc_ids,
strict_foreign_properties=strict_foreign_properties)

return document, copy.copy(metadata)
return document, metadata

def fetch(self, url, inject_ids=True): # type: (Text, bool) -> Any
if url in self.idx:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
}

setup(name='schema-salad',
version='3.2', # update the VERSION prefix in the Makefile as well 🙂
version='4.0', # update the VERSION prefix in the Makefile as well 🙂
description='Schema Annotations for Linked Avro Data (SALAD)',
long_description=open(README).read(),
author='Common workflow language working group',
Expand Down

0 comments on commit cb3177c

Please sign in to comment.