Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions chumpy/ch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,11 @@ def compute_dr_wrt(self, wrt):
# return func(self, *args, **kwargs)
# return property(with_caching)
# return _depends_on

def getargspec(func):
if hasattr(inspect, 'getargspec'): # backward compatibility
return inspect.getargspec(func)
else: # python 3.11 compatibility
return inspect.getfullargspec(func)

def depends_on(*dependencies):
deps = set()
Expand All @@ -1200,7 +1204,7 @@ def depends_on(*dependencies):
[deps.add(d) for d in dep]

def _depends_on(func):
want_out = 'out' in inspect.getargspec(func).args
want_out = 'out' in getargspec(func).args

@wraps(func)
def with_caching(self, *args, **kwargs):
Expand Down Expand Up @@ -1243,7 +1247,7 @@ def on_changed(self, which):
self.args[argname].x = getattr(self, argname)

def __init__(self, lmb, initial_args=None):
args = {argname: ChHandle(x=Ch(idx)) for idx, argname in enumerate(inspect.getargspec(lmb)[0])}
args = {argname: ChHandle(x=Ch(idx)) for idx, argname in enumerate(getargspec(lmb)[0])}
if initial_args is not None:
for initial_arg in initial_args:
if initial_arg in args:
Expand Down
2 changes: 1 addition & 1 deletion chumpy/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version = '0.71'
version = '0.72'
short_version = version
full_version = version