Message404674
In Python 3.10, it seems that top-level frames generated by running exec() have their f_lineno attribute set to None.
inspect.getframeinfo() tries to build context lines and fails on this line in such a case:
start = lineno - 1 - context//2
because lineno is None.
It's not clear whether this is a bug in inspect or the way such frames get their f_lineno attribute initialized.
The same code works just fine in Python 3.9. |
|
Date |
User |
Action |
Args |
2021-10-21 22:02:12 | lemburg | set | recipients:
+ lemburg |
2021-10-21 22:02:12 | lemburg | set | messageid: <1634853732.41.0.89193081236.issue45563@roundup.psfhosted.org> |
2021-10-21 22:02:12 | lemburg | link | issue45563 messages |
2021-10-21 22:02:12 | lemburg | create | |
|