[Python-Dev] status of absolute_import w/ python 2.7 (original) (raw)
Brett Cannon brett at python.org
Wed Jul 13 05:41:28 CEST 2011
- Previous message: [Python-Dev] status of absolute_import w/ python 2.7
- Next message: [Python-Dev] status of absolute_import w/ python 2.7
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Jul 8, 2011 at 06:51, Sylvain Thénault <sylvain.thenault at logilab.fr>wrote:
Hi there,
the documentation state that absoluteimport feature is the default behaviour with python 2.7, though it seems that it behave differently with the future import : $ cat package/init.py import subpackage $ python2.7 Python 2.7.1+ (default, Apr 20 2011, 22:33:39) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import package >>> $ cat package/init.py from future import absoluteimport import subpackage $ python2.7 Python 2.7.1+ (default, Apr 20 2011, 22:33:39) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import package Traceback (most recent call last): File "", line 1, in File "package/init.py", line 23, in import subpackage ImportError: No module named subpackage
So are you claiming that the import of 'package' 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20110712/164e3dd0/attachment.html>
- Previous message: [Python-Dev] status of absolute_import w/ python 2.7
- Next message: [Python-Dev] status of absolute_import w/ python 2.7
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]