[issue20684] inspect.getfullargspec (etc) incorrectly follows __wrapped__ chains

Nick Coghlan report at bugs.python.org
Wed Feb 19 14:29:42 CET 2014


Nick Coghlan added the comment:

Attached patch moves the signature to an internal helper that takes an additional flag - whether or not to follow wrapper chains. getfullargspec() now calls this with the flag turned off, and that is passed down to any recursive calls.

I'll be offline again until tomorrow evening, so don't feel obliged to wait for me if the patch looks good or just needs minor tweaks before merging.

I also noticed a quirk with the getfullargspec -> signature fallback - we still drop the leading arg for partialmethod and other sources of signatures that aren't special cased. That's probably OK though - previously those wouldn't report signatures at all.

----------
keywords: +patch
stage: test needed -> patch review
title: inspect.getfullargspec (etc) incorrectly follow __wrapped__ chains -> inspect.getfullargspec (etc) incorrectly follows __wrapped__ chains
Added file: http://bugs.python.org/file34143/issue20684_ignore_wrapped_in_argspec.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20684>
_______________________________________


More information about the Python-bugs-list mailing list