Author Oren Milman
Recipients Oren Milman
Date 2017-09-11.12:49:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The following code causes an assertion failure in PyErr_WriteUnraisable() (in

class BadException(Exception):
    __module__ = None

class BadClass:
    def __del__(self):
        raise BadException

foo = BadClass()
del foo

this is because PyErr_WriteUnraisable() assumes that __module__ is a string,
and passes it to _PyUnicode_EqualToASCIIId(), which asserts it received a string.

what is the wanted behavior in such a case?
should we ignore the bad __module__ and print '<unknown>' as the module name
in the traceback?
Date User Action Args
2017-09-11 12:49:19Oren Milmansetrecipients: + Oren Milman
2017-09-11 12:49:19Oren Milmansetmessageid: <>
2017-09-11 12:49:19Oren Milmanlinkissue31418 messages
2017-09-11 12:49:19Oren Milmancreate