From ceebb48d3775862745fa560c3a0a6c98dbd259bb Mon Sep 17 00:00:00 2001 From: Junghoon Seo Date: Tue, 6 Jun 2023 19:24:22 +0900 Subject: [PATCH] [Bug Fix] inspect.getargspec is deprecated in Python 3.6 --- chumpy/ch.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/chumpy/ch.py b/chumpy/ch.py index e903df9..5700067 100644 --- a/chumpy/ch.py +++ b/chumpy/ch.py @@ -1200,7 +1200,12 @@ def depends_on(*dependencies): [deps.add(d) for d in dep] def _depends_on(func): - want_out = 'out' in inspect.getargspec(func).args + if sys.version_info[0] <= 3 and sys.version_info[1] < 6: # If Python version is less than 3.6 + # use getargspec + want_out = 'out' in inspect.getargspec(func).args + else: + # use getfullargspec + want_out = 'out' in inspect.getfullargspec(func).args @wraps(func) def with_caching(self, *args, **kwargs):