[issue38599] Deprecate creation of asyncio object when the loop is not running

Andrew Svetlov report at bugs.python.org
Mon Oct 28 18:59:07 EDT 2019


Andrew Svetlov <andrew.svetlov at gmail.com> added the comment:

I'm pretty happy with asyncio.run() functionalit.

I used run() for the bug demonstration, but the example can be rewritten easily without this function.

The problem is not in run() but in an object lifecycle. Implicit loop creation plus module-level initialization provides a pretty big set of ways to shoot in the foot :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38599>
_______________________________________


More information about the Python-bugs-list mailing list