Yury Selivanov added the comment:
This is now fixed in #17481.
--
dependencies: +inspect.getfullargspec should use __signature__
nosy: +yselivanov
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
Mark Lawrence added the comment:
Would someone please review the patch file as it's out of my league.
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8639
___
Changes by Maxim Bublis b...@codemonkey.ru:
Removed file: http://bugs.python.org/file22825/inspect.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8639
___
Maxim Bublis b...@codemonkey.ru added the comment:
I've ran into the same problem with getfullargspec not supporting callables, so
I've written patch with docs and tests, that adds support for any Python
callable. As a result of getfullargspec's implementation change, getargspec
function also
Benjamin Peterson benja...@python.org added the comment:
I'm -0.5. I think the current patch makes too many assumptions for the caller.
For example, someone calling a class may really desire __new__'s signature, not
that of __init__. Moreover, conceptually, getargspec() returns the argspec of
Michael Foord mich...@voidspace.org.uk added the comment:
Right. For a callable object (instance with __call__ method), it's unambiguous
which signature you want. For a class it's ambiguous.
--
___
Python tracker rep...@bugs.python.org
Maxim Bublis b...@codemonkey.ru added the comment:
Agree, support for __new__ or __init__ methods would add some ambiquity, so
i've decided to drop __init__ support from patch. Patch has been reuploaded.
--
Added file: http://bugs.python.org/file22826/inspect2.patch
Nick Coghlan ncogh...@gmail.com added the comment:
This API has changed around a bit in 3.x, so it is actually
inspect.getfullargspec that needs to change (getargspec will inherit the new
behaviour though, since it uses getfullargspec internally)
With appropriate docs and tests updates, I
Michael Foord mich...@voidspace.org.uk added the comment:
I can produce a patch w/ tests and documentation for you to review Nick.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8639
___