Andrey Vlasovskikh <andrey.vlasovsk...@gmail.com> added the comment:
I've added a PR with a patch I developed during the EuroPython 2018 sprint. I've fixed this issue in a way that is more or less consistent with how '_thread' threads interact with sys.excepthook, but I haven't added the log line they print to sys.stderr about an unhandled exception in a thread: Unhandled exception in thread started by <function <lambda> at 0x108c840d0> I can add these messages if they are needed. I'd like to mention the issue I discussed with Victor Stinner at the sprints (adding Victor to the nosy list as he requested). The fix could possibly break the de facto contract that has been there for ages that 'theading' threads don't invoke sys.excepthook on uncaught exceptions. If the fact that sys.execepthook doesn't work with threading is considered a feature, then an alternative solution could be a new threading-specific hook: threading.excepthook. ---------- nosy: +vlasovskikh, vstinner _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue1230540> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com