fix: Don't use the deprecated location for Hashable

The Hashable object was moved in python 3.3 and support for the old
location is dropped in python 3.10 the new location is available in
python 3.8 so we can just update this and it should work with both
python 3.8 and 3.11

https://docs.python.org/3.8/library/collections.html
This commit is contained in:
Feanil Patel
2024-03-15 13:00:22 -04:00
parent 884fe8ace9
commit 6ea63da969

View File

@@ -126,7 +126,7 @@ class process_cached: # pylint: disable=invalid-name
self.cache = {}
def __call__(self, *args):
if not isinstance(args, collections.Hashable):
if not isinstance(args, collections.abc.Hashable):
# uncacheable. a list, for instance.
# better to not cache than blow up.
return self.func(*args)