summaryrefslogtreecommitdiffstats
path: root/base/common/python/pki/upgrade.py
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2015-08-16 19:45:38 +0200
committerChristian Heimes <cheimes@redhat.com>2015-08-17 21:14:12 +0200
commit082cb953f5cc1950e107583be504ac94c6b52e50 (patch)
treeb51c5b5a5464958ad45a03c8577e346f00092f68 /base/common/python/pki/upgrade.py
parentec7707c4f72b140699cec562856917e2409d7d7b (diff)
downloadpki-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/upgrade.py')
-rw-r--r--base/common/python/pki/upgrade.py6
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):