On Wed, Jul 13, 2011 at 1:41 PM, Brett Cannon <br...@python.org> wrote: > 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.
No, the problem is that __future__.absolute_import claims to be the default behaviour in 2.7, but this does not appear to actually be the case - it still tries the implicit relative import. E.g, given the following setup: cwd /package /__init__.py /submodule.py /submodule2.py an "import submodule" in __init__.py or submodule2.py will succeed. Now, the what's new for 2.7 doesn't actually *say* we made that change and I can't find any evidence for it in NEWS either, so I think the bug is actually in the __future__ module (and docs: http://docs.python.org/library/__future__). Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com