[issue2410] absolute import doesn't work for standard python modules

2008-04-08 Thread Nick Coghlan
Nick Coghlan [EMAIL PROTECTED] added the comment: Running the interactive interpreter like that places the current directory on sys.path, so it *is* doing an absolute import of your pseudo email package. (If it didn't do that, your test would fail at the import foo line) Instead of cd'ing into

[issue2410] absolute import doesn't work for standard python modules

2008-04-08 Thread Nick Coghlan
Nick Coghlan [EMAIL PROTECTED] added the comment: Using relative imports within smtplib wouldn't have made any difference in this case. Your dummy email package was the first one encountered on sys.path, so the import email.smtplib line (which does an import email internally as the first step in

[issue2410] absolute import doesn't work for standard python modules

2008-03-18 Thread Bruce Frederiksen
New submission from Bruce Frederiksen [EMAIL PROTECTED]: Try this to reproduce error: $ mkdir -p test/email $ cd test $ touch __init__.py email/__init__.py $ cat ! foo.py from __future__ import absolute_import import smtplib ! $ python import foo ... File /usr/lib/python2.6/smtplib.py, line