[issue6526] importlib.import_module affects permissions of .pyc files subsequently created by import

Brett Cannon report at bugs.python.org
Mon Aug 31 02:37:12 CEST 2009


Brett Cannon <brett at python.org> added the comment:

Turns out the failure is because I have simply been opening bytecode 
files for writing using _io.FileIO(..., 'w') which just uses the OS's 
default permissions. Guess that won't cut it anymore. =)

So does this mean I am expected to chmod the bytecode file to have 
matching read and write bits to the source but no execution bits 
regardless of the source file? And what about writing new bytecode 
files? I am not about to ignore permissions and simply write over files 
just because I can as someone could have set them independently of 
Python to be read-only.

Let me know that I am doing the right thing, David.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6526>
_______________________________________


More information about the Python-bugs-list mailing list