Brett Cannon <br...@python.org> added the comment:

It will because your file change happens so quickly by script that your file 
system isn't leading to a different mtime on the source, and so the bytecode 
isn't being regenerated. When you do it by hand you're physically slow enough 
to have the file copies take long enough for your file system to record the new 
mtime.

You can try using importlib.invalidate_caches() to help with this. Otherwise 
realize that importlib.reload() is really meant for interactive use and not 
script use anyway because it doesn't update old references to the module.

----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

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

Reply via email to