[issue25970] py_compile.compile fails if existing bytecode file is unwritable

2022-02-06 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue25970] py_compile.compile fails if existing bytecode file is unwritable

2022-01-25 Thread Irit Katriel
Irit Katriel added the comment: It is explicitly documented that existing files are not overwritten and the script fails in this case, so I think this is a feature: https://docs.python.org/3/library/py_compile.html#py_compile.compile -- nosy: +iritkatriel resolution: -> rejected sta

[issue25970] py_compile.compile fails if existing bytecode file is unwritable

2015-12-28 Thread Robert Byrnes
New submission from Robert Byrnes: In Python/import.c, open_exclusive unlinks any existing bytecode file before opening to create a new one. However, py_compile.compile doesn't unlink before opening, and therefore fails if an existing bytecode file is unwritable. It would be nice to unlink fi