[Python-ideas] Proporsal: Show an alert in traceback when the source file is newer than compiled code (issue8087)

Diego Mascialino dmascialino at gmail.com
Sat Oct 8 14:37:37 CEST 2011


On Fri, Oct 7, 2011 at 8:04 PM, Cameron Simpson <cs at zip.com.au> wrote:
>
> Only when the traceback was being printed. You would need to stash the
> modtime at import for later reference.


Actually the source file modtime there is in the compiled source (.pyc).
Import use this information to know if is necessary to compile the source again.

In my patch, when a traceback is going to be printed, I compare the
actual modtime
with the modtime stored in the pyc.

Regards,
    Diego



More information about the Python-ideas mailing list