Andrew Svetlov <andrew.svet...@gmail.com> added the comment:
Global future objects (and global asyncio objects in general) don't work with asyncio.run(). The lifecycle of these objects should be closer than loop but asyncio.run() creates a loop during execution. I think this is a good design, we have a plan to deprecate and eventually drop all old-times mess that allows confusions. All three of your problems are because you use a global future which is implicitly attached to the different loop. Also I'd like to note that futures are low-level API, which is very delicate and error-prone. Futures are crucial for libraries building (e.g. aiohttp uses them a lot) but working with futures in application code is an explicit sign of bad design. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37172> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com