bpo-43933: Set frame.f_lineno during call to __exit__ (GH-25719)
* Set line number of __exit__ call in a with statement to be that of the with keyword.
diff --git a/Lib/test/test_dis.py b/Lib/test/test_dis.py
index 8d05935..21c68d4 100644
--- a/Lib/test/test_dis.py
+++ b/Lib/test/test_dis.py
@@ -1087,7 +1087,7 @@ def jumpy():
Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=154, starts_line=None, is_jump_target=False),
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=156, starts_line=None, is_jump_target=False),
Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=158, starts_line=None, is_jump_target=False),
- Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=160, starts_line=None, is_jump_target=False),
+ Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=160, starts_line=25, is_jump_target=False),
Instruction(opname='DUP_TOP', opcode=4, arg=None, argval=None, argrepr='', offset=162, starts_line=None, is_jump_target=False),
Instruction(opname='DUP_TOP', opcode=4, arg=None, argval=None, argrepr='', offset=164, starts_line=None, is_jump_target=False),
Instruction(opname='CALL_FUNCTION', opcode=131, arg=3, argval=3, argrepr='', offset=166, starts_line=None, is_jump_target=False),
diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py
index 49e8928..40dd92c 100644
--- a/Lib/test/test_sys_settrace.py
+++ b/Lib/test/test_sys_settrace.py
@@ -936,10 +936,11 @@ def func():
(-4, 'line'),
(-4, 'return'),
(2, 'line'),
+ (1, 'line'),
(-3, 'call'),
(-2, 'line'),
(-2, 'return'),
- (2, 'return')])
+ (1, 'return')])
def test_if_false_in_try_except(self):