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 asvetlov
Recipients John Belmonte, asvetlov, xtreak, yselivanov
Date 2019-06-25.12:17:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561465035.79.0.0141726709176.issue37398@roundup.psfhosted.org>
In-reply-to
Content
Got you.

iscoroutinefunction() is not reliable: it detects async functions only but fails if we have a regular function that returns awaitable object.

I think AsyncContextDecorator is needed here to explicitly point that you want to wrap async function.

Another question is: sync or async context manager should be applied? I see use cases for both variants
History
Date User Action Args
2019-06-25 12:17:15asvetlovsetrecipients: + asvetlov, yselivanov, xtreak, John Belmonte
2019-06-25 12:17:15asvetlovsetmessageid: <1561465035.79.0.0141726709176.issue37398@roundup.psfhosted.org>
2019-06-25 12:17:15asvetlovlinkissue37398 messages
2019-06-25 12:17:15asvetlovcreate