2021-05-30 11:57:39

hello, I have some async code that I want to use  with a code that will be cythonized later,
but after cythonizing it doesn't seam to know that async def means its async, since the library I used kept complaining that it needs a coroutine and not _cython_function or methid_, or something like that, it works as expected in the not cythonized version
is there any thing I can do?
thanks in advance

2021-05-30 17:12:50

Upgrade your version of Cython.  If that doesn't work, then I bet this does it:

async def wrapper(*args, **kwargs):
    await my_cython_thing(*args, **kwargs)

I haven't used Cython with asyncio but it is supposed to work, and it might be worth opening a bug with them.

My Blog
Twitter: @ajhicks1992