Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
I don't know how to reproduce a failure in tp_clear(). I just can't prove that it never fails. Maybe it is needed a bug in the implementation of the buffer protocol in third-party extension. If it should not happen then we can just add assert(!PyErr_Occurred()); or if (PyErr_Occurred()) { PyErr_WriteUnraisable(NULL); } It is better to crash in memoryview.c than in the garbage collector if this crash is caused by incorrect buffer protocol implementation. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33713> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com