Issue2540
Created on 2017-01-14.19:30:13 by nedbat, last changed 2018-03-02.08:17:44 by jeff.allen.
msg11021 (view) |
Author: Ned Batchelder (nedbat) |
Date: 2017-01-14.19:30:13 |
|
Similar to #1751, the trace function doesn't report events for "with" statements:
$ cat bug.py
import sys
def tracefunc(frame, event, arg):
print "Trace", event, frame.f_lineno
return tracefunc
def do():
with open("hello.txt", "w") as f:
f.write("Hello\n")
sys.settrace(tracefunc)
do()
$ python2.7 bug.py
Trace call 7
Trace line 8
Trace line 9
Trace return 9
Trace call 38
Trace call 38
$ jython bug.py
Trace call 7
Trace line 9
Trace return 9
$
|
msg11443 (view) |
Author: Jim Baker (zyasoft) |
Date: 2017-06-23.16:52:43 |
|
Fix by changing the compiler to emit appropriate instrumentation.
|
msg11733 (view) |
Author: Jeff Allen (jeff.allen) |
Date: 2018-03-02.08:17:44 |
|
Propose this is not a showstopper for 2.7.2
|
|
Date |
User |
Action |
Args |
2018-03-02 08:17:44 | jeff.allen | set | nosy:
+ jeff.allen messages:
+ msg11733 milestone: Jython 2.7.2 -> |
2017-06-23 16:52:43 | zyasoft | set | nosy:
+ zyasoft messages:
+ msg11443 milestone: Jython 2.7.2 |
2017-01-14 19:30:14 | nedbat | create | |
|