Message391893
What exactly is the issue here?
That the line number is -1, or that is different from 3.9?
The `-1` should be `None`. I can fix that, but there is the issue of whether the cleanup code in a with statement should have a line number or not.
The traceback for 3.9 is incorrect, the program is not on line 10 when __exit__ is called.
Currently we mark the cleanup code for the with statement as artificial meaning that it has no line number.
We could give it the line number of the `with` keyword, but that might break coverage and profiling tools.
PEP 626 says that the "with" keyword is executable, and should be traced, but nothing about whether that includes the cleanup call to __exit__. |
|
Date |
User |
Action |
Args |
2021-04-26 10:16:29 | Mark.Shannon | set | recipients:
+ Mark.Shannon, nedbat, Anthony Sottile, pablogsal |
2021-04-26 10:16:29 | Mark.Shannon | set | messageid: <1619432189.9.0.641473510775.issue43933@roundup.psfhosted.org> |
2021-04-26 10:16:29 | Mark.Shannon | link | issue43933 messages |
2021-04-26 10:16:29 | Mark.Shannon | create | |
|