[issue35343] Importlib.reload has different behaviour in script and interactive mode

2018-11-28 Thread Owen Pembery
New submission from Owen Pembery : This may be a bug, or may be a hole in my understanding of how importlib.reload works. In short, when running importlib.reload in a script, it seems that a module is not reloaded before it is used, whereas running the same script a line at a time in interac

[issue35343] Importlib.reload has different behaviour in script and interactive mode

2018-11-28 Thread Owen Pembery
Change by Owen Pembery : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue35343] Importlib.reload has different behaviour in script and interactive mode

2018-11-29 Thread Brett Cannon
Brett Cannon 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