Author vlasovskikh
Recipients CyberJacob, Decorater, Matt Groth, ellisj, eric.araujo, mwh, ncoghlan, nikratio, pitrou, tiagoaoa, tim.peters, undercoveridiot, vlasovskikh, vstinner
Date 2018-08-01.22:08:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1533161304.27.0.56676864532.issue1230540@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-08-01 22:08:24vlasovskikhsetrecipients: + vlasovskikh, mwh, tim.peters, ncoghlan, ellisj, pitrou, vstinner, tiagoaoa, eric.araujo, nikratio, undercoveridiot, Decorater, CyberJacob, Matt Groth
2018-08-01 22:08:24vlasovskikhsetmessageid: <1533161304.27.0.56676864532.issue1230540@psf.upfronthosting.co.za>
2018-08-01 22:08:24vlasovskikhlinkissue1230540 messages
2018-08-01 22:08:24vlasovskikhcreate