[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5dbb28ececdd0382d85b164aaf37bec1ae08036c by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': [3.6] bpo-31418: Fix an assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__ attribute. (GH-3539) (#3556)

[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-13 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3548 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f6e61df01536493f1280cd07639c7ff9bffb2cdc by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-31418: Fix an assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__ attribute. (#3539) https://github.com/py

[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-13 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch pull_requests: +3534 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyFile_WriteObject(moduleName, f, Py_PRINT_RAW) implicitly converts its argument to string. I mean that treating non-string moduleName the same way as string moduleName not equal to string "builtins" and calling PyFile_WriteObject() would cause other problem

[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-13 Thread Oren Milman
Oren Milman added the comment: what do you mean by 'Implicit converting to str can raise a warning or exception if __module__ is a bytes object.'? should we treat __module__ differently in case it is a bytes object? -- ___ Python tracker

[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think this patch doesn't need a test (which would require using a subprocess). -- ___ Python tracker ___ __

[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Printing '' LGTM. Implicit converting to str can raise a warning or exception if __module__ is a bytes object. -- nosy: +serhiy.storchaka ___ Python tracker __

[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-11 Thread Oren Milman
New submission from Oren Milman: The following code causes an assertion failure in PyErr_WriteUnraisable() (in Python/errors.c): class BadException(Exception): __module__ = None class BadClass: def __del__(self): raise BadException foo = BadClass() del foo this is because PyE