mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Merge fix from #6074 from 3.3
This commit is contained in:
commit
d4f5ad6c6e
4 changed files with 2023 additions and 1958 deletions
|
@ -1048,6 +1048,9 @@ class SourceFileLoader(FileLoader, SourceLoader):
|
|||
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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue