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

Fix inspect.getargspec deprecation warning in Python 3 #1327

Closed
jhlegarreta opened this issue Sep 9, 2017 · 5 comments
Closed

Fix inspect.getargspec deprecation warning in Python 3 #1327

jhlegarreta opened this issue Sep 9, 2017 · 5 comments

Comments

@jhlegarreta
Copy link
Contributor

jhlegarreta commented Sep 9, 2017

The USE_PRE=1 builds are failing among others because the

DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead
   specs = inspect.getargspec(fnc)

deprecation warning is being displayed due to the use of Python 3.

@jhlegarreta
Copy link
Contributor Author

I'm looking into this. Would using

try: #Python3
    specs = inspect.signature(fnc)
except AttributeError: # Python2
   specs = inspect.getargspec(fnc)

solve the issue?

I've seen that others suggest using inspect.getfullargspec(), which seems to be fine:
https://docs.python.org/3/library/inspect.html

@naveenkumarmarri
Copy link
Contributor

I've raised PR #1413 for this issue, can someone review it?

@jhlegarreta
Copy link
Contributor Author

@skoudoro The corresponding card in the dipy 0.14.0 card can be marked as WIP.

@skoudoro skoudoro moved this from Issues without PR to WIP in Dipy 0.14.0 Feb 5, 2018
@skoudoro
Copy link
Member

skoudoro commented Feb 5, 2018

Thanks for pointing that @jhlegarreta

@skoudoro skoudoro moved this from WIP to Done in Dipy 0.14.0 Feb 10, 2018
@skoudoro
Copy link
Member

#1413 is merged and card updated, you can close this issue @jhlegarreta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Dipy 0.14.0
  
Done
Development

No branches or pull requests

3 participants