Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Fix] inspect.getargspec is deprecated in Python 3.6 #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 6 additions & 1 deletion chumpy/ch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down