Issue 20313: inspect.signature should raise ValueError for builtins with no signature info (original) (raw)
Issue20313
This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/64512
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 2022-04-11 14:57 by admin. 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) * ![]() |
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) * ![]() |
Date: 2014-01-20 16:59 |
This is already a part of (except the doc fix). | ||
msg208551 - (view) | Author: Yury Selivanov (yselivanov) * ![]() |
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) * ![]() |
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) * ![]() |
Date: 2014-01-23 14:01 |
I've worked your changes into the patch for #20189. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:57 | admin | set | github: 64512 |
2014-01-23 14:01:18 | larry | set | messages: + |
2014-01-21 07:51:39 | larry | set | status: open -> closedresolution: duplicatemessages: + stage: resolved |
2014-01-20 17:02:33 | yselivanov | set | messages: + |
2014-01-20 16:59:59 | zach.ware | set | nosy: + zach.waremessages: + |
2014-01-20 16:56:33 | yselivanov | create |