This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fornellas
Recipients asvetlov, dhiltonp, eamanu, fornellas, scoder, yselivanov
Date 2019-12-10.21:06:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576011986.71.0.373901838291.issue38225@roundup.psfhosted.org>
In-reply-to
Content
It is worth noting that test frameworks can greatly benefit from iscoroutinefunction to work.

I'm the main author of TestSlide, which provides more strict mocking for Python. I recently added async support, so we can detect bugs such as configuring a sync mock for something that is async (https://testslide.readthedocs.io/en/2.0.2/strict_mock/index.html#coroutine-functions-async-def). It works just fine, as long as iscoroutinefunction works, which is not the case for async Cython (a big chunk of TestSlide's use cases).

+1 an Andrew's func.__awaitable__ idea: interpreter can provide that for `async def` and one can also do that for anything that implements __call__ to communicate that the callable is async.
History
Date User Action Args
2019-12-10 21:06:26fornellassetrecipients: + fornellas, scoder, asvetlov, yselivanov, eamanu, dhiltonp
2019-12-10 21:06:26fornellassetmessageid: <1576011986.71.0.373901838291.issue38225@roundup.psfhosted.org>
2019-12-10 21:06:26fornellaslinkissue38225 messages
2019-12-10 21:06:26fornellascreate