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 yselivanov
Recipients John Belmonte, asvetlov, ncoghlan, njs, xtreak, yselivanov
Date 2019-08-12.15:12:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565622726.18.0.856896830258.issue37398@roundup.psfhosted.org>
In-reply-to
Content
> I think a simple iscoroutinefunction check will be pretty close to 100% matching what users expect.

Yes, "pretty close", but not reliable. :)  E.g. I can easily design a decorator that when applied first would break the proposed iscoroutinefunction logic.  While decorators like that aren't popular, I'd be wary about introducing a solution that can lead to hours of debugging in some weird (and maybe stupid) cases.

> 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.)

+1 to implement a warning the way you suggest.
History
Date User Action Args
2019-08-12 15:12:06yselivanovsetrecipients: + yselivanov, ncoghlan, njs, asvetlov, xtreak, John Belmonte
2019-08-12 15:12:06yselivanovsetmessageid: <1565622726.18.0.856896830258.issue37398@roundup.psfhosted.org>
2019-08-12 15:12:06yselivanovlinkissue37398 messages
2019-08-12 15:12:05yselivanovcreate