[New-bugs-announce] [issue6526] importlib.import_module affects permissions of .pyc files subsequently created by import
R. David Murray
report at bugs.python.org
Mon Jul 20 20:45:23 CEST 2009
New submission from R. David Murray <rdmurray at bitdance.com>:
In debugging an intermittent test failure we discovered that if '.' is
in the path and import_module is called, then what happens when
__import__ causes the creation of a .pyc file changes. Without the
forgoing, the permissions of the .py file are copied to the .pyc file
(although the fix for issue 6070 removes the execute bits if set). With
the forgoing, the write bit is set on the .pyc file even if it was not
set on the .py file.
The second behavior is how things always worked before 2.6. (Why it
changed in 2.6 I don't know, and I'm not convinced it was a change for
the better; see also issue 6074).
I will upload a test as soon as I create the issue and get an issue
number to label it with.
Note that this issue exists only 3.x, even though trunk uses the
backported import_module function from importlib.
components: Library (Lib)
nosy: brett.cannon, r.david.murray
stage: needs patch
title: importlib.import_module affects permissions of .pyc files subsequently created by import
versions: Python 3.1, Python 3.2
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce