-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly handle .pyc mtimes for .py files changing multiple times
If a .py file changes multiple times we can end up in a situation where there is an .py file with corresponding .pyc file that we rewrote, so both are now mtime==1. Then a new version of the .py file is added, but the corresponding .pyc file is not updated. This means that the .pyc file is stale, and python would not normally use it. However, we will later change the mtime on the .py file to 1, causing the old .pyo file to look up-to-date even though its stale. We fix this by detecting the case where the is a new mtime on a .py file where the .pyc file doesn't match, and remove the stale .pyc file.
- Loading branch information
1 parent
7fe9322
commit 006d9a1
Showing
1 changed file
with
42 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters