Brett Cannon added the comment:

So that all happens because importlib does an atomic write of the file which 
uses os.replace(): 
http://hg.python.org/cpython/file/83d70dd58fef/Lib/importlib/_bootstrap.py#l121 
.

Unless there is some way that I can't think of to have the atomic write still 
exist but not change the type of file it replaces I am still not willing to 
revert my change just for this use case. There should be a single 
implementation of bytecode file generation and py_compile (along with 
compileall) should be nothing more than convenience modules for forcing the 
generation of those files under the same semantics as if they were done as a 
side-effect of importing some source code.

----------
nosy: +pitrou

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17222>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to