STINNER Victor added the comment: I don't like such "hacks". IMHO It's too late to try to log errors, to execute code to cleanup objects, etc.
You should try to implement something in aiohttp or even in the application to cleanup objects at exit. For example, it's probably wrong if you still have tasks when the event loop is closed. Especially if tasks are still pending. See this part of the doc which lists "pending tasks at exit": https://docs.python.org/dev/library/asyncio-dev.html#chain-coroutines-correctly For "exceptions never consumed", I proposed a different enhancement in asyncio directly: https://bugs.python.org/issue24598 What do you think? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25074> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com