aboutsummaryrefslogtreecommitdiffhomepage
path: root/libs/dogpile/cache/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'libs/dogpile/cache/util.py')
-rw-r--r--libs/dogpile/cache/util.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/libs/dogpile/cache/util.py b/libs/dogpile/cache/util.py
index 4b56f6429..16bcd1c97 100644
--- a/libs/dogpile/cache/util.py
+++ b/libs/dogpile/cache/util.py
@@ -1,5 +1,4 @@
from hashlib import sha1
-import inspect
from ..util import compat
from ..util import langhelpers
@@ -28,7 +27,7 @@ def function_key_generator(namespace, fn, to_str=compat.string_type):
else:
namespace = '%s:%s|%s' % (fn.__module__, fn.__name__, namespace)
- args = inspect.getargspec(fn)
+ args = compat.inspect_getargspec(fn)
has_self = args[0] and args[0][0] in ('self', 'cls')
def generate_key(*args, **kw):
@@ -50,7 +49,7 @@ def function_multi_key_generator(namespace, fn, to_str=compat.string_type):
else:
namespace = '%s:%s|%s' % (fn.__module__, fn.__name__, namespace)
- args = inspect.getargspec(fn)
+ args = compat.inspect_getargspec(fn)
has_self = args[0] and args[0][0] in ('self', 'cls')
def generate_keys(*args, **kw):
@@ -88,7 +87,7 @@ def kwarg_function_key_generator(namespace, fn, to_str=compat.string_type):
else:
namespace = '%s:%s|%s' % (fn.__module__, fn.__name__, namespace)
- argspec = inspect.getargspec(fn)
+ argspec = compat.inspect_getargspec(fn)
default_list = list(argspec.defaults or [])
# Reverse the list, as we want to compare the argspec by negative index,
# meaning default_list[0] should be args[-1], which works well with