Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! ZEO.asyncio: switch to async/await style
@d-maurer notes at #218 (comment) : Why do we need this special __await__ logic? It is not present in #195 and nevertheless all uvloop tests passed. and he is right - in 7f574ec I missed to do the full removal of py2 support code from CoroutineExecutor: in py2 it was @coroutine def dothing1(): yield dothing2() this way the yield for dothing2 was working this way: - dothing2() called - it returns a coroutine object - yield yields that coroutine object, not objects that second coroutine object would yield by itself. This is the difference in beween yield and `yield from`. - CoroutineExecutor was noticing such yield and handling `yield coro()` with the same semantic as if it was `yield from coro()` by manually creating another AsyncTask. but on py3 await has semantic of `yield from` and so we do not need to keep all that `yield from` emulating code. 7f574ec dropped part of that, but did not drop special handling of `yield coro()` if coro is non-native custom coroutine function. Let that code go as well.
- Loading branch information