You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code works with Trio 0.22.2. However, it fails with 0.23.1:
importasyncioimportsniffioimporttriofromtrio_asyncioimportopen_loop, aio_as_trio@aio_as_trioasyncdefaio_func() ->None:
awaitasyncio.sleep(1) # The next line will fail. But, this sleep works fine which shows we are actually in asyncio contextassertsniffio.current_async_library() =="asyncio"asyncdefmain() ->None:
assertsniffio.current_async_library() =="trio"asyncwithopen_loop():
awaitaio_func()
if__name__=="__main__":
trio.run(main)
The text was updated successfully, but these errors were encountered:
I haven't checked to see if your sample works before then, but cc @oremanj just in case!
OK so failure bisects to that -- it looks like trio-asyncio uses current_async_library_cvar which unfortunately does not take precedence over the new thread_local mechanism.
The following code works with Trio 0.22.2. However, it fails with 0.23.1:
The text was updated successfully, but these errors were encountered: