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

Comments

Projects
3 participants
@jhlegarreta
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

This comment has been minimized.

Contributor

jhlegarreta commented Sep 9, 2017

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

This comment has been minimized.

Contributor

naveenkumarmarri commented Feb 3, 2018

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

@jhlegarreta

This comment has been minimized.

Contributor

jhlegarreta commented Feb 5, 2018

@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

This comment has been minimized.

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

This comment has been minimized.

Member

skoudoro commented Feb 10, 2018

#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