Aigars Mahinovs added the comment:

As a point of update - this is a problem that can make debugging more difficult 
for people running web services or other server processes that are expected to 
stay alive for a long time. It is often undesirable to force a server restart 
or reload every time a new code base is deployed, so you can get into 
situations where code running does not match the code on disk. 

If you get a crash and a traceback in such situation, you will be very confused.

As discussed already, this could be solved by taking a hash of the source code 
at module import time and then comparing that to the code on disk during 
traceback printing time - if there is a difference, then print a big fat 
warning that the traceback may be unreliable.

I just lost two days tracking down weird issues that in the end were caused by 
server failing to reload code when it should have done so. Having such warning 
on the first traceback would have alerted me to the problem much earlier.

----------
nosy: +Aigars Mahinovs

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8087>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to