Message373131
This make non-await list comprehension coroutine-code-objects as well:
https://bugs.python.org/issue41218
import ast
import inspect
cell = '[x for x in l]'
code = compile(cell, "<>", "exec", flags=getattr(ast,'PyCF_ALLOW_TOP_LEVEL_AWAIT', 0x0))
inspect.CO_COROUTINE & code.co_flags == inspect.CO_COROUTINE # this is now TRUE.
This leads to weird things in Jupyter/IPython when we try to detect wether a block of code is, or os not async. |
|
Date |
User |
Action |
Args |
2020-07-06 15:05:55 | mbussonn | set | recipients:
+ mbussonn, vstinner, asvetlov, lukasz.langa, serhiy.storchaka, hroncok, pablogsal, miss-islington, BTaskaya, jack1142 |
2020-07-06 15:05:55 | mbussonn | set | messageid: <1594047955.83.0.205840982184.issue39562@roundup.psfhosted.org> |
2020-07-06 15:05:55 | mbussonn | link | issue39562 messages |
2020-07-06 15:05:55 | mbussonn | create | |
|