#1279 python3 multiple modules relative import problem

None
closed
nobody
python (259)
5
2013-02-22
2012-11-09
Michel Zou
No

Hi,

There is a problem when using multiple modules as mentionned in:
http://old.nabble.com/python-3-import-should-be-absolute-td30898293.html

I provided an example and provided an updated patch against current trunk.

To compile & run the example:
make PY3=y
make PY3=y run

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/schueller/projects/example/site-package/top/__init__.py", line 1, in <module>
from .bar import *
File "/home/schueller/projects/example/site-package/top/bar.py", line 70, in <module>
import foo
ImportError: No module named foo

Regards,
M.

Discussion

  • Michel Zou

    Michel Zou - 2012-11-09
     
  • Michel Zou

    Michel Zou - 2012-11-09
     
    Attachments
  • Michel Zou

    Michel Zou - 2013-02-22

    Hi,
    It works from 2.0.9!
    You can close it.
    Cheers!

     
  • William Fulton

    William Fulton - 2013-02-22

    Closing as reported as fixed.

     
  • William Fulton

    William Fulton - 2013-02-22
    • status: open --> closed
    • milestone: -->
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks