Stefan Behnel <stefan...@behnel.de> added the comment:
I think the REPL could, when it formats a stack trace for printing, check every referenced source file if it's newer than its compiled .pyc (bytecode) file, and insert a warning into the stack trace if that is the case. I don't see any use in doing this for all stack traces, so only ones that get printed out for the user could receive special treatment. I also don't think we need to go further than that, e.g. check startup or module import time. Basically, whenever the source file is not in sync with the .pyc file, it's not unlikely that the code that is running corresponds to the .pyc file and no longer to the .py file. Changing to target version to 3.8, since this is essentially a new feature and not acceptable as a bug fix for older versions. ---------- nosy: +scoder type: behavior -> enhancement versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35857> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com