diff options
author | Christian Heimes <cheimes@redhat.com> | 2015-08-16 19:45:38 +0200 |
---|---|---|
committer | Christian Heimes <cheimes@redhat.com> | 2015-08-17 21:14:12 +0200 |
commit | 082cb953f5cc1950e107583be504ac94c6b52e50 (patch) | |
tree | b51c5b5a5464958ad45a03c8577e346f00092f68 /base/common/python/pki | |
parent | ec7707c4f72b140699cec562856917e2409d7d7b (diff) | |
download | pki-082cb953f5cc1950e107583be504ac94c6b52e50.tar.gz pki-082cb953f5cc1950e107583be504ac94c6b52e50.tar.xz pki-082cb953f5cc1950e107583be504ac94c6b52e50.zip |
Py3 compatibility: __eq__ blocks inheritance of __hash__
Some types implement __eq__ but don't provide a __hash__ function. Mark
these types as non-hashable with __hash__ = None. This fixes:
DeprecationWarning:
Overriding __eq__ blocks inheritance of __hash__ in 3.x
Diffstat (limited to 'base/common/python/pki')
-rw-r--r-- | base/common/python/pki/upgrade.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/common/python/pki/upgrade.py b/base/common/python/pki/upgrade.py index 44decd5bd..bc7e278e7 100644 --- a/base/common/python/pki/upgrade.py +++ b/base/common/python/pki/upgrade.py @@ -95,6 +95,9 @@ class Version(object): return False + # not hashable + __hash__ = None + def __repr__(self): return self.version @@ -445,6 +448,9 @@ class PKIUpgradeScriptlet(object): return self.version == other.version and self.index < other.index + # not hashable + __hash__ = None + class PKIUpgrader(object): |