[New-bugs-announce] [issue31772] SourceLoader uses stale bytecode in case of equal mtime seconds
report at bugs.python.org
Thu Oct 12 09:43:00 EDT 2017
New submission from Devin Bayer <dev at doubly.so>:
The current import machinery will use stale cached bytecode if the source is modified more than once per second and with equal size.
A straightforward fix is to require the bytecode mtime to be greater than the source file mtime. In the unusual case where the file is written twice with the precision the filesystem records, this will ignore the cache, but at least we aren't behaving incorrectly.
components: Interpreter Core
title: SourceLoader uses stale bytecode in case of equal mtime seconds
versions: Python 3.7
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce