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 njs
Recipients John Belmonte, asvetlov, ncoghlan, njs, xtreak, yselivanov
Date 2019-08-09.20:32:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
@Yury: depends on what you mean by "100% reliable" :-). Like I said above, I'm normally super against automagic detection of sync-vs-async functions because of all the edge cases where it goes wrong, but in this specific case where people are writing a decorator one line above their def/async def, I think a simple iscoroutinefunction check will be pretty close to 100% matching what users expect.

Or, if we don't change the semantics, then we can still be 100% confident that if iscoroutinefunction returns true, then the user has made a mistake. (I.e., if we make this issue a warning, then it's possible we'll miss print a warning in some complicated cases, but we can be confident that all the warnings we do print are correct.)
History
Date User Action Args
2019-08-09 20:32:23njssetrecipients: + njs, ncoghlan, asvetlov, yselivanov, xtreak, John Belmonte
2019-08-09 20:32:23njssetmessageid: <[email protected]>
2019-08-09 20:32:22njslinkissue37398 messages
2019-08-09 20:32:22njscreate