You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
inspect.signature fails on some functions which use Argument Clinic #64360
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/larryhastings'closed_at=<Date2014-01-07.20:53:31.930>created_at=<Date2014-01-07.09:38:39.405>labels= ['type-bug']
title='inspect.signature fails on some functions which use Argument Clinic'updated_at=<Date2014-01-07.20:53:31.930>user='https://github.com/serhiy-storchaka'
inspect.signature fails on some functions which use Argument Clinic. For example after applying bpo-20133 or bpo-20151 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/inspect.py", line 1468, in signature
return Signature.from_builtin(obj)
File "/home/serhiy/py/cpython/Lib/inspect.py", line 1989, in from_builtin
p(name, default)
File "/home/serhiy/py/cpython/Lib/inspect.py", line 1982, in p
default = default.n
AttributeError: type object '_empty' has no attribute 'n'
Activity
serhiy-storchaka commentedon Jan 7, 2014
inspect.signature fails on some functions which use Argument Clinic. For example after applying bpo-20133 or bpo-20151 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/inspect.py", line 1468, in signature return Signature.from_builtin(obj) File "/home/serhiy/py/cpython/Lib/inspect.py", line 1989, in from_builtin p(name, default) File "/home/serhiy/py/cpython/Lib/inspect.py", line 1982, in p default = default.n AttributeError: type object '_empty' has no attribute 'n'larryhastings commentedon Jan 7, 2014
I already noticed this; it'll be fixed in the patch for bpo-20144. But thanks for the report!
larryhastings commentedon Jan 7, 2014
Fixed as a side effect of fixing bpo-20144. And by the way this was never a release blocker.