Mercurial > cpython-lru_cache-weakref
diff Lib/importlib/_bootstrap.py @ 79832:bbb3459fbcb8 3.3
Issue #6074: Apply an appropriate fix for importlib based imports
| author | Nick Coghlan <ncoghlan@gmail.com> |
|---|---|
| date | Fri, 19 Oct 2012 23:32:00 +1000 |
| parents | 53ce30b62de2 |
| children | 58d6fea0c0c7 bedcc790c6e7 |
line wrap: on
line diff
--- a/Lib/importlib/_bootstrap.py Fri Oct 19 22:58:06 2012 +1000 +++ b/Lib/importlib/_bootstrap.py Fri Oct 19 23:32:00 2012 +1000 @@ -1048,6 +1048,9 @@ mode = _os.stat(source_path).st_mode except OSError: mode = 0o666 + # We always ensure write access so we can update cached files + # later even when the source files are read-only on Windows (#6074) + mode |= 0o200 return self.set_data(bytecode_path, data, _mode=mode) def set_data(self, path, data, *, _mode=0o666):
