[issue25074] Bind logger and waninigs modules for asyncio __del__ methods

2017-12-20 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25074] Bind logger and waninigs modules for asyncio __del__ methods

2015-11-13 Thread Andrew Svetlov
Andrew Svetlov added the comment: Yes, the approach use hackery shadows for binding global variables on shutdown stage. The same I've found in subprocess module: see https://github.com/python/cpython/blob/master/Lib/subprocess.py#L1544 The problem is: I want to inform users about unclosed

[issue25074] Bind logger and waninigs modules for asyncio __del__ methods

2015-09-15 Thread Andrew Svetlov
Andrew Svetlov added the comment: > 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. The problem is for

[issue25074] Bind logger and waninigs modules for asyncio __del__ methods

2015-09-14 Thread STINNER Victor
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

[issue25074] Bind logger and waninigs modules for asyncio __del__ methods

2015-09-11 Thread Andrew Svetlov
New submission from Andrew Svetlov: See https://github.com/KeepSafe/aiohttp/issues/497 for the reason. Desctructors and descendant code (`loop.call_exception_handler()`) can be called on interpreter shutdown stage, which leads to printouts like 'None object has no attribute "errror"'.