[New-bugs-announce] [issue42117] asyncio calls from sync/async, better docs or api support

Blaze Spinnaker report at bugs.python.org
Thu Oct 22 09:47:16 EDT 2020


New submission from Blaze Spinnaker <blazespinnaker at gmail.com>:

In jupyter / ipython, other repls, as well as from libraries,  asyncio code can be called.  To simplify integration, there should be a way for libraries to transparently do the right thing, call await or start a new global running event loop.  

This can be done without breaking the colored functions design constraint (only async can call async) and would not lead to dynamic coroutine architectures like gevent / lua.

The change would significantly reduce confusion that is pervasive in the python ecosystem and has lead to many people using a defacto approach of monkey patching (a monkey patch which only works on the surface).

Alternative, if this approach simply can not be accepted, better and more emphasized headline asyncio documentation would be appropriate to explain why the constraint is in place and the best patterns to use to work around the problem.   

It took me a lot of googling before I understood the reasoning of what is a very significant design choice.

There are many instances of this issue causing problems, but let me highlight this link:

https://github.com/ipython/ipykernel/issues/548#issuecomment-713637954

----------
components: asyncio
messages: 379292
nosy: asvetlov, blazespinnaker, yselivanov
priority: normal
severity: normal
status: open
title: asyncio calls from sync/async, better docs or api support
type: enhancement

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


More information about the New-bugs-announce mailing list