[issue31300] Traceback prints different code than the running module

2017-08-29 Thread R. David Murray

R. David Murray added the comment:

This is a duplicate of issue 8087, which contains quite a bit of discussion of 
the subtleties of the issue.

--
nosy: +r.david.murray
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



[issue31300] Traceback prints different code than the running module

2017-08-29 Thread Aigars Mahinovs

New submission from Aigars Mahinovs:

If you run a longer running Python program, then change the Python module that 
it loaded on disk and then cause a traceback to happen in the code in that 
module, then the traceback may be nonsensical as it will reference line numbers 
from the module in memory, but print code from the same line numbers from the 
file on disk, even if they are different.

In any case there should be a prominent warning on traceback if the module in 
memory does not match the module on disk, but ideally the traceback print 
should show the code in memory - the actual code that caused the problem.

--
components: Library (Lib)
messages: 300980
nosy: Aigars Mahinovs
priority: normal
severity: normal
status: open
title: Traceback prints different code than the running module
type: behavior
versions: Python 3.6

___
Python tracker 

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