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

Robert Byrnes report at bugs.python.org
Mon Dec 28 17:39:26 EST 2015


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 <report at bugs.python.org>
<http://bugs.python.org/issue25970>
_______________________________________


More information about the Python-bugs-list mailing list