[issue13266] Add inspect.unwrap(f) to easily unravel "__wrapped__" chains
Nick Coghlan
report at bugs.python.org
Tue Mar 19 19:16:05 CET 2013
Nick Coghlan added the comment:
Turns out there's a bug in the implementation of functools.update_wrapper :P
Added that as a dependency, since this API doesn't make sense until update_wrapper is behaving itself.
The new tests didn't pick it up because they don't use wraps or update_wrapper, they set __wrapped__ directly.
Also, the replacement of the recursion in inspect.signature is incorrect - we want to interleave checks for __signature__ as we recurse through the stack of wrapper functions.
----------
dependencies: +functools.update_wrapper mishandles __wrapped__
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13266>
_______________________________________
More information about the Python-bugs-list
mailing list