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 serhiy.storchaka
Recipients serhiy.storchaka
Date 2015-05-21.08:40:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1432197646.74.0.848752631202.issue24257@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-05-21 08:40:46serhiy.storchakasetrecipients: + serhiy.storchaka
2015-05-21 08:40:46serhiy.storchakasetmessageid: <1432197646.74.0.848752631202.issue24257@psf.upfronthosting.co.za>
2015-05-21 08:40:46serhiy.storchakalinkissue24257 messages
2015-05-21 08:40:46serhiy.storchakacreate