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.

Author ncoghlan
Recipients Claudiu.Popa, Yury.Selivanov, larry, michael.foord, ncoghlan, terry.reedy, yselivanov
Date 2014-01-20.12:10:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390219819.23.0.810903444983.issue17481@psf.upfronthosting.co.za>
In-reply-to
Content
Ah, I had indeed missed the fact that getfullargspec() was still calling isfunction(). In that case, is the patch currently actually buying us anything much beyond handling __signature__ attributes? Most of the new types that inspect.signature() supports will still fail that preliminary check, so code will need to use the new API explicitly in order to benefit from it.

By contrast, if we remove the check, then there's a wider range of exceptions that may be thrown, but also a much wider variety of inputs supported.

Instead of keeping the check, we could just unconditionally convert exceptions from the signature call to a TypeError in order to maintain compatibility with the old external behaviour.
History
Date User Action Args
2014-01-20 12:10:19ncoghlansetrecipients: + ncoghlan, terry.reedy, larry, michael.foord, Claudiu.Popa, Yury.Selivanov, yselivanov
2014-01-20 12:10:19ncoghlansetmessageid: <1390219819.23.0.810903444983.issue17481@psf.upfronthosting.co.za>
2014-01-20 12:10:19ncoghlanlinkissue17481 messages
2014-01-20 12:10:18ncoghlancreate