Author serhiy.storchaka
Recipients serhiy.storchaka
Date 2015-05-21.08:40:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
PyObject_IsInstance() is used incorrectly for testing if Python object is an instance of specified builtin type before direct access to internals of object. This is not correct, because PyObject_IsInstance() checks the __class__ attribute that can be modified and even can be dynamic property. Correct way is to check static type. Proposed patch replaces PyObject_IsInstance() with PyObject_TypeCheck() if this is appropriate.

See also similar issues issue24102 and issue24091.
Date User Action Args
2015-05-21 08:40:46serhiy.storchakasetrecipients: + serhiy.storchaka
2015-05-21 08:40:46serhiy.storchakasetmessageid: <>
2015-05-21 08:40:46serhiy.storchakalinkissue24257 messages
2015-05-21 08:40:46serhiy.storchakacreate