This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Aigars Mahinovs
Recipients Aigars Mahinovs, Jim.Jewett, chortos, dmascialino, eric.araujo, eric.snow, ezio.melotti, jjconti, loewis, ncoghlan, rbcollins, ubershmekel
Date 2017-08-29.14:03:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1504015434.95.0.165316285796.issue8087@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-08-29 14:03:55Aigars Mahinovssetrecipients: + Aigars Mahinovs, loewis, ncoghlan, rbcollins, jjconti, ezio.melotti, eric.araujo, ubershmekel, chortos, dmascialino, eric.snow, Jim.Jewett
2017-08-29 14:03:54Aigars Mahinovssetmessageid: <1504015434.95.0.165316285796.issue8087@psf.upfronthosting.co.za>
2017-08-29 14:03:54Aigars Mahinovslinkissue8087 messages
2017-08-29 14:03:54Aigars Mahinovscreate