<br><br><div class="gmail_quote">On Fri, Jul 8, 2011 at 06:51, Sylvain Thénault <span dir="ltr">&lt;<a href="mailto:sylvain.thenault@logilab.fr">sylvain.thenault@logilab.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi there,<br>
<br>
the documentation state that absolute_import feature is the default<br>
behaviour with python 2.7, though it seems that it behave differently<br>
with the __future__ import :<br>
<br>
$ cat package/__init__.py<br>
<br>
import subpackage<br>
<br>
$ python2.7<br>
Python 2.7.1+ (default, Apr 20 2011, 22:33:39)<br>
[GCC 4.5.2] on linux2<br>
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.<br>
&gt;&gt;&gt; import package<br>
&gt;&gt;&gt;<br>
<br>
$ cat package/__init__.py<br>
<br>
from __future__ import absolute_import<br>
import subpackage<br>
<br>
$ python2.7<br>
Python 2.7.1+ (default, Apr 20 2011, 22:33:39)<br>
[GCC 4.5.2] on linux2<br>
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.<br>
&gt;&gt;&gt; import package<br>
Traceback (most recent call last):<br>
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>
  File &quot;package/__init__.py&quot;, line 23, in &lt;module&gt;<br>
    import subpackage<br>
ImportError: No module named subpackage<br></blockquote><div><br></div><div>So are you claiming that the import of &#39;package&#39; w/o the __future__ statement actually succeeds even though there is no package.subpackage module? Obviously that would be a flat-out bug, but I just double-checked my sanity and that does nto work with a CPython 2.7 checkout. </div>

</div>