From 6ea63da96916a58e5d27f290e106c5effac80a84 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Fri, 15 Mar 2024 13:00:22 -0400 Subject: [PATCH] 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 --- openedx/core/lib/cache_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openedx/core/lib/cache_utils.py b/openedx/core/lib/cache_utils.py index b53aeedf88..c379ab2d96 100644 --- a/openedx/core/lib/cache_utils.py +++ b/openedx/core/lib/cache_utils.py @@ -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)