Closed dasunprem closed 11 months ago
The cause is that generator-based coroutines with @asyncio.coroutine have been removed in 3.11.
https://docs.python.org/3.10/library/asyncio-task.html#generator-based-coroutines
async def
was added in Python 3.5. It looks like Ubuntu 16.04 even has Python 3.5, so I think we don't really need to worry about compatibility.
As the coroutine bug is possibly fixed by the above changes I get a new error as follows
Could that be a bug in your own code? _start
is supposed to be called on a connection, so maybe you need an await
in your code. (I'm not familiar with Python async at all, so I'm shooting in the dark.)
This is fixed by #298. Currently Python 3.11 is known to work on the master
branch with respect to this issue. Follow #301 for a versioned release.
Hi, I have installed the RethinkDB python driver using
pip install rethinkdb
and its working perfectly well. But when I connecting with asyncio usingr.set_loop_type('asyncio')
, it throws an errormodule 'asyncio' has no attribute 'coroutine'
. My python version is 3.11To Reproduce Steps to reproduce the behavior: I installed with
pip install rethinkdb
and the installed version in 2.4.9System info
Additional context As a personal experiment I remove all the
@asyncio.coroutine
and addedasync
in front of the reletivedef
and replacedyeild from
toawait
on the file rethinkdb/asyncio_net/net_asyncio.pyAs the coroutine bug is possibly fixed by the above changes I get a new error as follows