diff options
-rw-r--r-- | jsonpatch.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/jsonpatch.py b/jsonpatch.py index 32508e2..3c83f61 100644 --- a/jsonpatch.py +++ b/jsonpatch.py @@ -105,8 +105,11 @@ def get_loadjson(): function with object_pairs_hook set to multidict for Python versions that support the parameter. """ - argspec = inspect.getargspec(json.load) - if 'object_pairs_hook' not in argspec.args: + if sys.version_info >= (3, 3): + args = inspect.signature(json.load).parameters + else: + args = inspect.getargspec(json.load).args + if 'object_pairs_hook' not in args: return json.load return functools.partial(json.load, object_pairs_hook=multidict) |