Merge "Make Functions unhashable"

This commit is contained in:
Jenkins 2016-03-09 02:07:00 +00:00 committed by Gerrit Code Review
commit 6d6a2956c8
2 changed files with 2 additions and 3 deletions

View File

@ -123,8 +123,7 @@ class Function(object):
return NotImplemented
return not eq
def __hash__(self):
return id(self)
__hash__ = None
def resolve(snippet):

View File

@ -87,7 +87,7 @@ class ResourceDefinitionCore(object):
if deletion_policy is not None:
assert deletion_policy in self.DELETION_POLICIES
self._hash ^= hash(deletion_policy)
self._hash ^= _hash_data(deletion_policy)
if update_policy is not None:
assert isinstance(update_policy, (collections.Mapping,