[issue35792] Specifying AbstractEventLoop.run_in_executor as a coroutine conflicts with implementation/intent

2019-04-20 Thread Christopher Hunt
Christopher Hunt added the comment: For impl.1: > (very breaking change) should be > (very breaking change, mitigated some by the fact that the implementation > will warn about the unawaited future) -- ___ Python tracker

[issue35792] Specifying AbstractEventLoop.run_in_executor as a coroutine conflicts with implementation/intent

2019-04-19 Thread Christopher Hunt
Christopher Hunt added the comment: My use case is scheduling work against an executor but waiting on the results later (on demand). If converting `BaseEventLoop.run_in_executor(executor, func, *args)` to a coroutine function, I believe there are two possible approaches (the discussion

[issue35792] Specifying AbstractEventLoop.run_in_executor as a coroutine conflicts with implementation/intent

2019-04-19 Thread Andrew Svetlov
Andrew Svetlov added the comment: I would rather change the implementation by converting it into async function. It can break some code, sure -- but in a very explicit way (coroutine `run_in_executor is never awaited` error). Making existing third-party code forward-compatible is trivial:

[issue35792] Specifying AbstractEventLoop.run_in_executor as a coroutine conflicts with implementation/intent

2019-01-20 Thread Christopher Hunt
New submission from Christopher Hunt : Currently AbstractEventLoop.run_in_executor is specified as a coroutine, while BaseEventLoop.run_in_executor is actually a non-coroutine that returns a Future object. The behavior of BaseEventLoop.run_in_executor would be significantly different if