From 082cb953f5cc1950e107583be504ac94c6b52e50 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sun, 16 Aug 2015 19:45:38 +0200 Subject: 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 --- base/common/python/pki/upgrade.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'base/common/python') 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): -- cgit