@@ -1065,7 +1065,6 @@ def validate_meta(meta: Optional[CacheMeta], id: str, path: Optional[str],
1065
1065
manager .log ('Metadata abandoned for {}: data cache is modified' .format (id ))
1066
1066
return None
1067
1067
1068
- # TODO: Share stat() outcome with find_module()
1069
1068
path = os .path .abspath (path )
1070
1069
st = manager .get_stat (path ) # TODO: Errors
1071
1070
if not stat .S_ISREG (st .st_mode ):
@@ -1310,14 +1309,6 @@ def delete_cache(id: str, path: str, manager: BuildManager) -> None:
1310
1309
d. from P import M; checks filesystem whether module P.M exists in
1311
1310
filesystem.
1312
1311
1313
- e. Race conditions, where somebody modifies a file while we're
1314
- processing. I propose not to modify the algorithm to handle this,
1315
- but to detect when this could lead to inconsistencies. (For
1316
- example, when we decide on the dependencies based on cache
1317
- metadata, and then we decide to re-parse a file because of a stale
1318
- dependency, if the re-parsing leads to a different list of
1319
- dependencies we should warn the user or start over.)
1320
-
1321
1312
Steps
1322
1313
-----
1323
1314
@@ -1852,11 +1843,6 @@ def compute_dependencies(self) -> None:
1852
1843
if self .id != 'builtins' and 'builtins' not in dep_line_map :
1853
1844
dependencies .append ('builtins' )
1854
1845
1855
- # NOTE: What to do about race conditions (like editing the
1856
- # file while mypy runs)? A previous version of this code
1857
- # explicitly checked for this, but ran afoul of other reasons
1858
- # for differences (e.g. silent mode).
1859
-
1860
1846
# Missing dependencies will be moved from dependencies to
1861
1847
# suppressed when they fail to be loaded in load_graph.
1862
1848
self .dependencies = dependencies
0 commit comments