Issue 20161: inspect.signature fails on some functions which use Argument Clinic (original) (raw)

inspect.signature fails on some functions which use Argument Clinic. For example after applying or it fails for audioop.ratecv and binascii.a2b_qp.

inspect.signature(audioop.ratecv) Traceback (most recent call last): File "", line 1, in 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'