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

R. David Murray report at bugs.python.org
Tue Jul 21 01:25:36 CEST 2009

R. David Murray <rdmurray at bitdance.com> added the comment:

Oh, a bit of clarification: the call that creates the pyc file in both
the "normal" case and the error case is a call to the normal import
command (or __import__ in the test case). The call to import_module is a
prereq to producing the bug, but it doesn't matter what module it
imports (as long as it hasn't been previously imported).  The import
that shows the behavior imports a TESTFN module in the test case.

You might want to load up the test case and play with it.  I'm
completely mystified as to how import_module could be affecting the
regular import semantics...I'm guessing it is a subtle side effect of
something unexpected ;)


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list