Brett Cannon <br...@python.org> added the comment:

On Mon, Jul 20, 2009 at 16:25, R. David Murray <rep...@bugs.python.org>wrote:

>
> R. David Murray <rdmur...@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 ;)

It's beyond mystifying as both importlib.__import__ and
importlib.import_module are thin wrappers that do nothing but splice strings
for the same function that does the heavy lifting. But I will see if I ever
find time to work on this.

----------
Added file: http://bugs.python.org/file14527/unnamed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6526>
_______________________________________
<br><br><div class="gmail_quote">On Mon, Jul 20, 2009 at 16:25, R. David Murray 
<span dir="ltr">&lt;<a 
href="mailto:rep...@bugs.python.org";>rep...@bugs.python.org</a>&gt;</span> 
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 
.8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
R. David Murray &lt;<a 
href="mailto:rdmur...@bitdance.com";>rdmur...@bitdance.com</a>&gt; added the 
comment:<br>
<br>
Oh, a bit of clarification: the call that creates the pyc file in both<br>
the &quot;normal&quot; case and the error case is a call to the normal 
import<br>
command (or __import__ in the test case). The call to import_module is a<br>
prereq to producing the bug, but it doesn&#39;t matter what module it<br>
imports (as long as it hasn&#39;t been previously imported).  The import<br>
that shows the behavior imports a TESTFN module in the test case.<br>
<br>
You might want to load up the test case and play with it.  I&#39;m<br>
completely mystified as to how import_module could be affecting the<br>
regular import semantics...I&#39;m guessing it is a subtle side effect of<br>
something unexpected ;)</blockquote><div><br></div><div>It&#39;s beyond 
mystifying as both importlib.__import__ and importlib.import_module are thin 
wrappers that do nothing but splice strings for the same function that does the 
heavy lifting. But I will see if I ever find time to work on this. </div>

</div>
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to