[issue25489] sys.exit() caught in async event loop exception handler

2022-03-22 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25489] sys.exit() caught in async event loop exception handler

2022-03-21 Thread Guido van Rossum
Guido van Rossum added the comment: Andrew, thanks for explaining this. The key thing I was missing was that the root cause of the problem is that Future.__del__ is trying to log an error about the un-awaited task by calling the exception handler directly. That actually feels a little

[issue25489] sys.exit() caught in async event loop exception handler

2022-03-21 Thread Andrew Svetlov
Andrew Svetlov added the comment: Guido, perhaps you had problems with the problem detection because the asyncio uses _asyncio C Extesions by default. It drops some calls from the python stack trace. -- ___ Python tracker

[issue25489] sys.exit() caught in async event loop exception handler

2022-03-21 Thread Andrew Svetlov
Andrew Svetlov added the comment: I can describe what happens with test_sys_exit_in_exception_handler.py 1. The 'boom' task raises an exception. 2. The task is not awaited, Future.__del__ calls the exception handler with 'Task exception was never retrieved' message. 3. The custom handler

[issue25489] sys.exit() caught in async event loop exception handler

2022-03-20 Thread Gregory P. Smith
Change by Gregory P. Smith : -- title: sys.exit() caught in exception handler -> sys.exit() caught in async event loop exception handler ___ Python tracker ___