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

Devin Bayer report at bugs.python.org
Fri Oct 13 02:19:53 EDT 2017


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

Thanks for the support Nick. I think your proposed idea would still result in rare but confusing behavior, which is the type of surprise Python should avoid.

The hash-based pyc files doesn't seem like a solution to me, because it won't be enabled by default. And I think it's obvious the performance loss of doing so is unacceptable.

If changing the bytecode format is unacceptable, though it seems like the cleanest answer, the import machinery could just avoid caching bytecode when the int(mtime) of the source file is potentially in the future.

----------

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


More information about the Python-bugs-list mailing list