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 serhiy.storchaka
Recipients asvetlov, cheryl.sabella, chris.jerdonek, giampaolo.rodola, gvanrossum, mbussonn, ncoghlan, nikicat, njs, nzsmith, ryanhiebert, serhiy.storchaka, xgdomingo, yselivanov
Date 2021-03-13.15:04:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615647850.27.0.786473969691.issue30491@roundup.psfhosted.org>
In-reply-to
Content
The most common error is missing keyword "await" in function call. "f()" instead of "await f()".

There is a way to detect this error at runtime with minimal false positive and with minimal overhead. We can add a new opcode which checks if the value on the top of the stack is awaitable and raise warning/error in that case, and add it after every functional call whose result is ignored in asynchronous functions. It could even be merged with POP_TOP to reduce overhead.

    CALL_FUNCTION ...
    WARN_IF_AWAITABLE_AND_POP_TOP
History
Date User Action Args
2021-03-13 15:04:10serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, ncoghlan, giampaolo.rodola, njs, asvetlov, chris.jerdonek, yselivanov, nikicat, mbussonn, ryanhiebert, cheryl.sabella, xgdomingo, nzsmith
2021-03-13 15:04:10serhiy.storchakasetmessageid: <1615647850.27.0.786473969691.issue30491@roundup.psfhosted.org>
2021-03-13 15:04:10serhiy.storchakalinkissue30491 messages
2021-03-13 15:04:10serhiy.storchakacreate