New submission from Devin Bayer <d...@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 messages: 304236 nosy: akvadrako priority: normal severity: normal status: open title: SourceLoader uses stale bytecode in case of equal mtime seconds type: behavior versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31772> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com