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.

Title: inspect.signature fails on some functions which use Argument Clinic
Type: behavior Stage: resolved
Components: Versions: Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: larry Nosy List: larry, serhiy.storchaka
Priority: normal Keywords:

Created on 2014-01-07 09:38 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg207521 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-01-07 09:38
inspect.signature fails on some functions which use Argument Clinic. For example after applying issue20133 or issue20151 it fails for audioop.ratecv and binascii.a2b_qp.

>>> inspect.signature(audioop.ratecv)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/serhiy/py/cpython/Lib/", line 1468, in signature
    return Signature.from_builtin(obj)
  File "/home/serhiy/py/cpython/Lib/", line 1989, in from_builtin
    p(name, default)
  File "/home/serhiy/py/cpython/Lib/", line 1982, in p
    default = default.n
AttributeError: type object '_empty' has no attribute 'n'
msg207522 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-01-07 09:45
I already noticed this; it'll be fixed in the patch for #20144.  But thanks for the report!
msg207593 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-01-07 20:53
Fixed as a side effect of fixing #20144.  And by the way this was never a release blocker.
Date User Action Args
2022-04-11 14:57:56adminsetgithub: 64360
2014-01-07 20:53:31larrysetstatus: open -> closed
priority: release blocker -> normal
messages: + msg207593

assignee: larry
resolution: fixed
stage: resolved
2014-01-07 09:45:52larrysetmessages: + msg207522
2014-01-07 09:40:29serhiy.storchakalinkissue20148 dependencies
2014-01-07 09:40:11serhiy.storchakalinkissue20133 dependencies
2014-01-07 09:40:01serhiy.storchakalinkissue20151 dependencies
2014-01-07 09:38:39serhiy.storchakacreate