Since https://github.com/syrusakbary/promise/commit/90093a1ca51fac25e0f92f78fe7f33b697bf1629 the iscoroutine from inspect is used which is quite different to asyncio's. According to docs it recognizes async def. But it doesn't return true for @asyncio.coroutine functions. For them there's an isawaitable. Shouldn't it be used instead of inspect.iscoroutine? Also the inspect.iscoroutine is new in 3.5 so shouldn't we keep the asyncio.iscoroutine as a fallback option instead of removing it at all (seems like it breaks 3.4 compatibility).
Since https://github.com/syrusakbary/promise/commit/90093a1ca51fac25e0f92f78fe7f33b697bf1629 the
iscoroutine
frominspect
is used which is quite different toasyncio
's. According to docs it recognizesasync def
. But it doesn't return true for@asyncio.coroutine
functions. For them there's an isawaitable. Shouldn't it be used instead ofinspect.iscoroutine
? Also theinspect.iscoroutine
is new in 3.5 so shouldn't we keep theasyncio.iscoroutine
as a fallback option instead of removing it at all (seems like it breaks 3.4 compatibility).