[issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c

Brett Cannon report at bugs.python.org
Wed May 5 20:52:56 CEST 2010


Brett Cannon <brett at python.org> added the comment:

I just came across the warning myself (after ignoring all the PyType_INIT() warnings; what to do about those?) and came to the same conclusion: it's a pain to fix.

One option is to do a PyErr_Occurred() check at inherit_slots() call sites. Would that mitigate the leak? If I remember correctly inherit_slots() is not called constantly (only when a type is being created?) so having the expensive PyErr_Occurred() call should not hurt performance.

----------
nosy: +brett.cannon

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8627>
_______________________________________


More information about the Python-bugs-list mailing list