diff --git a/sopel/tools/__init__.py b/sopel/tools/__init__.py index 860492257b..e65e009095 100644 --- a/sopel/tools/__init__.py +++ b/sopel/tools/__init__.py @@ -636,6 +636,12 @@ def __contains__(self, key): self.lock.release() return result + # Needed to make it explicit that we don't care about the `lock` attribute + # when comparing/hashing SopelMemory objects. + __eq__ = dict.__eq__ + __ne__ = dict.__ne__ + __hash__ = dict.__hash__ + @deprecated def contains(self, key): """Check if ``key`` is in the memory