-
-
Notifications
You must be signed in to change notification settings - Fork 717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
async task classes are not fully implemented for Python 3.11 #6785
Comments
Looks like Coroutines were deprecated but not Awaitables |
on class ExampleAwaitable:
def __await__(self):
async def _():
return await asyncio.sleep(0)
return _().__await__()
import asyncio
print(f"{asyncio.iscoroutine(ExampleAwaitable())=}")
async def amain():
await asyncio.wait([ExampleAwaitable()])
print("waited!")
asyncio.run(amain()) and in 3.11 this fails:
|
I think we want to make most of these objects not Awaitables anyway eg. Nanny, Worker, ProcessInterface, MultiWorker where they can't really work correctly without
Maybe we could support |
* use sys.executable for python binary * pass the desired frame to traceback.walk_stack for 3.11 see python/cpython#96092 and it's not really intended for use outside of StackSummary.extract, see python/cpython#99015 (comment) * the GC overhead now depends on _PyType_PreHeaderSize faster-cpython/ideas#125 python/cpython@8319114#diff-a3a5c73931235f7f344c072dc755d6508e13923db3f5d581c5e88652075871cbR1684 * GH-6785: asyncio.wait no longer calls ensure_future python/cpython#95601 * test on python 3.11 * exclude macos py 3.10
Closing as we've added Python 3.11 support in #7249. @graingert @QuLogic let me know if this is still an issue and we can re-open as needed |
What happened:
It appears that in Python 3.11, more parts of async task-like classes must be implemented, but they are not in
distributed
. This seems to affect at leastNanny
,Worker
,ProcessInterface
,MultiWorker
, andFuture
.Nanny failure
Worker failure
ProcessInterface failure
MultiWorker failure
Future failure
What you expected to happen:
Tests all pass.
Environment:
The text was updated successfully, but these errors were encountered: