Eliminate bogus deprecation warning

There's nothing about hashing a ResourceDefinition that is deprecated or is
ever going away - in fact, the actual implementation of __hash__() is in
ResourceDefinitionCore, and it's only explicitly included in
ResourceDefinition because there is also an __eq__() method which would
otherwise cause Python 3 to override __hash__ with None (per
46233d2c2a). Therefore it's
completely wrong to log a warning, since everything will continue to work
fine when ResourceDefinition is replaced by ResourceDefinitionCore.

Change-Id: I33fc8727c9ec92580a2e2e7f4475d0f4fff2234b
Closes-Bug: #1546362
This commit is contained in:
Zane Bitter 2016-02-16 19:59:50 -05:00
parent 2a167504d0
commit d60d47b23f
1 changed files with 2 additions and 5 deletions

View File

@ -320,6 +320,8 @@ class ResourceDefinition(ResourceDefinitionCore, collections.Mapping):
return super(ResourceDefinition, self).__eq__(other)
__hash__ = ResourceDefinitionCore.__hash__
def __iter__(self):
"""Iterate over the available CFN template keys.
@ -375,11 +377,6 @@ class ResourceDefinition(ResourceDefinitionCore, collections.Mapping):
raise KeyError(key)
def __hash__(self):
"""Return a hash of the ResourceDefinition object."""
LOG.warning(self._deprecation_msg)
return super(ResourceDefinition, self).__hash__()
def __len__(self):
"""Return the number of available CFN template keys.