[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 first 
in this case too.

--
components: Library (Lib)
messages: 257142
nosy: byrnes
priority: normal
severity: normal
status: open
title: py_compile.compile fails if existing bytecode file is unwritable
type: behavior
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com