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
AbstactEventLoop.run_in_executor is listed as an async method, but should actually return a Future #84959
Comments
As discussed in < python/typeshed#3999 (comment) > the type of
However all concrete implementations of this method are actually not async methods but rather synchronous methods which return a Future object. Logically this appears to make sense: at base As such it seems that the current definition of the method as a coroutine is possibly a mistake. Alternatively if some feel that it is important to allow concrete implementations to implement it as a coroutine if they need to then perhaps it could be specified to be a method returning an Awaitable, since that would cover both options? |
From looking at the commit history of AbstactEventLoop.run_in_executor(), it seems that it was previously be a non-coroutine method prior to the conversion from the The only context for the change I can find is the following conversation between Andrew and Yury: #4753 (comment). However, the example provided of @andrew do you have any additional context to provide that I'm potentially missing? |
Is there any further movement on this? |
I think it makes sense to remove the If you want to help, you can submit a PR to do it. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: