[issue31772] SourceLoader uses stale bytecode in case of equal mtime seconds

Nick Coghlan report at bugs.python.org
Sat Oct 14 00:33:41 EDT 2017


Nick Coghlan <ncoghlan at gmail.com> added the comment:

Aye, I think that check would make the most sense, since the bytecode invalidation check is "_r_long(raw_timestamp) != source_mtime" (to allow for things like version control operations that send source timestamps backwards).

A test for that could then just mock time.time() to make sure it returned  a time matching the source mtime, and checked that the bytecode wasn't written.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31772>
_______________________________________


More information about the Python-bugs-list mailing list