Message388621
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 |
|
Date |
User |
Action |
Args |
2021-03-13 15:04:10 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, ncoghlan, giampaolo.rodola, njs, asvetlov, chris.jerdonek, yselivanov, nikicat, mbussonn, ryanhiebert, cheryl.sabella, xgdomingo, nzsmith |
2021-03-13 15:04:10 | serhiy.storchaka | set | messageid: <1615647850.27.0.786473969691.issue30491@roundup.psfhosted.org> |
2021-03-13 15:04:10 | serhiy.storchaka | link | issue30491 messages |
2021-03-13 15:04:10 | serhiy.storchaka | create | |
|