Author scoder
Recipients benjamin.peterson, eric.araujo, larry, ncoghlan, pitrou, python-dev, scoder, terry.reedy, yselivanov
Date 2014-02-02.11:42:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391341334.54.0.46898611667.issue17159@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-02-02 11:42:14scodersetrecipients: + scoder, terry.reedy, ncoghlan, pitrou, larry, benjamin.peterson, eric.araujo, python-dev, yselivanov
2014-02-02 11:42:14scodersetmessageid: <1391341334.54.0.46898611667.issue17159@psf.upfronthosting.co.za>
2014-02-02 11:42:14scoderlinkissue17159 messages
2014-02-02 11:42:14scodercreate