Message209972
Ok, I think I figured it out now.
Essentially, Cython's functions type, despite starting with the same struct layout as PyCFunction, must not visibly inherit from PyCFunction. Consequently, inspect.isbuiltin() returns False, as does inspect.isfunction() - sadly.
With Yury's changes that are currently committed, this triggers the fallback that checks for the function-like signature, which in turn makes Signature.from_function() properly analyse the signature, including default arguments, annotations, etc.
So, nothing left to change on CPython side for this ticket. And thanks again for the help. Closing as fixed. |
|
Date |
User |
Action |
Args |
2014-02-02 11:42:14 | scoder | set | recipients:
+ scoder, terry.reedy, ncoghlan, pitrou, larry, benjamin.peterson, eric.araujo, python-dev, yselivanov |
2014-02-02 11:42:14 | scoder | set | messageid: <1391341334.54.0.46898611667.issue17159@psf.upfronthosting.co.za> |
2014-02-02 11:42:14 | scoder | link | issue17159 messages |
2014-02-02 11:42:14 | scoder | create | |
|