Skip to content

Wrapped functions have lost inspect.getfullargspec information #12247

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

Closed
mrocklin opened this issue Oct 22, 2018 · 3 comments
Closed

Wrapped functions have lost inspect.getfullargspec information #12247

mrocklin opened this issue Oct 22, 2018 · 3 comments

Comments

@mrocklin
Copy link
Contributor

In master calling inspect.getfullargspec on some function now returns only args/kwargs. I suspect that this is due to the recent __array_function__ wrapping, though I am not sure.

Reproducing code example:

import numpy as np       
import inspect       
print(inspect.getfullargspec(np.nansum))
FullArgSpec(args=[], varargs='args', varkw='kwargs', defaults=None, kwonlyargs=[], kwonlydefaults=None, annotations={})  # version 1.16.0.dev0+db5750f
FullArgSpec(args=['a', 'axis', 'dtype', 'out', 'keepdims'], varargs=None, varkw=None, defaults=(None, None, None, <no value>), kwonlyargs=[], kwonlydefaults=None, annotations={})  # version 1.15.1

The inspect.signature function seems to work fine.

@mrocklin
Copy link
Contributor Author

cc @shoyer

@shoyer
Copy link
Member

shoyer commented Oct 22, 2018

Yes, see dask/dask#4111 and #12225

Closing this in favor of #12225.

@shoyer shoyer closed this as completed Oct 22, 2018
@mrocklin
Copy link
Contributor Author

Ah, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants