You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TaskGroup reports a child task's SystemExit as not propagated #162492
When a child task of an asyncio.TaskGroup raises SystemExit or KeyboardInterrupt, the task group propagates that exception and also passes it to the event loop's exception handler as an exception that was "not propagated".
TaskGroup task exception was not propagated because the TaskGroup body is being closed with a BaseException SystemExit(3)
Task exception was never retrieved SystemExit(3)
The first line comes from the reporting added for gh-135736 and is new in 3.16; 3.15 prints only the second line. With the default exception handler it is logged as an error with the full traceback of the SystemExit.
Expected: the exception that propagates out of the task group is not reported. Errors from other tasks are still reported.
Activity
gvanrossum commentedon Nov 23, 2026
This is intentional. Those exceptions ought to only be raised in order to stop the entire thread (remember one loop per thread).
If you are calling something that somehow raises one of these, you ought to catch those at the calling site.