﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32558	Fail tests when unhandled thread exceptions occur	Adam Johnson	nobody	"Pair of #32557 and its discussion.

In Python it's possible for a thread to be started, quit with an exception, and this exception never get seen since the main thread doesn't call `join()` on the failed thread.

Since Python 3.8 it's possible to detect such a case by installing a hook at `threading.excepthook`:  https://docs.python.org/3.9/library/threading.html#threading.excepthook

pytest recently added such a hook, alongside the unraisable exception hook: https://github.com/pytest-dev/pytest/pull/8055

I think we can do similarly here, since an exception in a non-main thread could indicate a problem with code. This is especially pertinent in the async world where sync code can be run in threads through `sync_to_async`"	New feature	new	Testing framework	dev	Normal			Carlton Gibson Tom Forbes Chris Jerdonek	Accepted	0	0	0	0	0	0
