classification
Title: inspect.Signature should work on decorated builtins
Type: behavior Stage: patch review
Components: Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: yselivanov Nosy List: brett.cannon, larry, ncoghlan, python-dev, yselivanov
Priority: high Keywords: needs review, patch

Created on 2014-01-28 21:04 by yselivanov, last changed 2014-01-29 15:53 by yselivanov. This issue is now closed.

Files
File name Uploaded Description Edit
decorated_builtins_01.patch yselivanov, 2014-01-28 21:04 review
Messages (4)
msg209585 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2014-01-28 21:04
inspect.signature should work with decorated builtins. Suppose I want to create a cached version of 'min' builtin:

   cached_min = functools.lru_cache()(min)

The signature of the 'cached_min' should match the signature of 'min'.

The patch is attached.
msg209636 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2014-01-29 12:19
Patch looks good to me.
msg209652 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-01-29 15:53
New changeset a9fedabb69e5 by Yury Selivanov in branch 'default':
inspect.signature: Add support for decorated (wrapped) builtins #20425
http://hg.python.org/cpython/rev/a9fedabb69e5
msg209653 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2014-01-29 15:53
Thanks for the review!
History
Date User Action Args
2014-01-29 15:53:38yselivanovsetstatus: open -> closed
resolution: fixed
messages: + msg209653
2014-01-29 15:53:08python-devsetnosy: + python-dev
messages: + msg209652
2014-01-29 12:19:27ncoghlansetmessages: + msg209636
2014-01-28 21:05:02yselivanovsetkeywords: + needs review
2014-01-28 21:04:52yselivanovcreate