[issue44284] Python references wrong line but correct line number in traceback

2021-06-02 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Unupdated source file in traceback

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44284] Python references wrong line but correct line number in traceback

2021-06-01 Thread helpimnotdrowning


New submission from helpimnotdrowning :

To reproduce (at least on Windows 10 w/ Python 3.9.4):

1) Make a python file:

while True:
print('hello')

2) Run the file via cmd
3) Edit the file (while it is still running):

while True:
print('goodbye')
print('hello')

then save it
4) ctrl+c in the cmd window to exit the script
5) The traceback will look something like this:

Traceback (most recent call last):
  File "dfb.py", line 2, in 
print('goodbye')
KeyboardInterrupt

The traceback mentions the print('goodbye') even though it wasnt in the file 
when it was run. It still calls it line 2, which is the line the print('hello') 
was before adding the print('goodbye')

--
messages: 394888
nosy: helpimnotdrowning
priority: normal
severity: normal
status: open
title: Python references wrong line but correct line number in traceback
type: behavior
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com