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

Devin Bayer report at bugs.python.org
Fri Oct 13 03:33:55 EDT 2017


Devin Bayer <dev at doubly.so> added the comment:

You can't demand a hot loader to react instantly and there are other use cases, like generating modules programatically.

What is your objection to my proposed solution, which behaves correctly in all cases?

If you are not importing modules immediately after writing them, there is no harm in skipping the cache if the file mtime differs from the current time.

If you are importing modules immediately, then you want to bypass the cache in that case, since it can't be relied upon.

----------

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


More information about the Python-bugs-list mailing list