From 7f58b968c2b16bee7984d006edbddaa18ddef3db Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Sat, 21 Oct 2017 21:28:05 +0200 Subject: [PATCH] Improve persistent dict key collision warning message --- pytools/persistent_dict.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pytools/persistent_dict.py b/pytools/persistent_dict.py index 02b14dc..3b25d8e 100644 --- a/pytools/persistent_dict.py +++ b/pytools/persistent_dict.py @@ -461,9 +461,11 @@ class _PersistentDictBase(object): from warnings import warn warn("%s: key collision in cache at '%s' -- these are " "sufficiently unlikely that they're often " - "indicative of a broken implementation " - "of equality comparison" + "indicative of a broken hash key implementation " + "(that is not considering some elements relevant " + "for equality comparison)" % (self.identifier, self.container_dir)) + # This is here so we can debug the equality comparison stored_key == key raise NoSuchEntryError(key) -- GitLab