classification
Title: inspect.signature should raise ValueError for builtins with no signature info
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.4
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, larry, ncoghlan, yselivanov, zach.ware
Priority: normal Keywords: patch

Created on 2014-01-20 16:56 by yselivanov, last changed 2014-01-23 14:01 by larry. This issue is now closed.

Files
File name Uploaded Description Edit
sig_builtin_01.patch yselivanov, 2014-01-20 16:56 review
Messages (5)
msg208548 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2014-01-20 16:56
'inspect.signature' currently returns 'None' for builtins with no signature information. However, the protocol is that it raises a "ValueError(callable is not supported by signature)" if object is callable, but a signature can not be provided.

Attached patch fixes this, as well as updates the relevant section in the inspect.signature documentation.
msg208550 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-01-20 16:59
This is already a part of issue20189 (except the doc fix).
msg208551 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2014-01-20 17:02
I see. Could you please incorporate the doc change and unittests into the patch for #20189?
msg208624 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-01-21 07:51
If you want to make sure that happens, please review my next patch for #20189, or fix it after that patch goes in if I forget.  (Honestly it's hard for me to keep track of everything right now.)
msg208925 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-01-23 14:01
I've worked your changes into the patch for #20189.
History
Date User Action Args
2014-01-23 14:01:18larrysetmessages: + msg208925
2014-01-21 07:51:39larrysetstatus: open -> closed
resolution: duplicate
messages: + msg208624

stage: resolved
2014-01-20 17:02:33yselivanovsetmessages: + msg208551
2014-01-20 16:59:59zach.waresetnosy: + zach.ware
messages: + msg208550
2014-01-20 16:56:33yselivanovcreate