[IronPython] Bug: module ImportError exception not being raised

Anthony Tarlano mailinglist.account at gmail.com
Thu Apr 6 22:59:01 CEST 2006


I found that IronPython Beta 5 is not raising ImportError and just
going into a livelock loop when there is a circular import between two

Here is the test case where you'll see CPython returning an
ImportError exception and IronPython spining

DELL# ls
a.py  b.py
DELL# cat a.py
from b import BClass

class AClass:
DELL# cat b.py
from a import AClass

class BClass:
DELL# python a.py
Traceback (most recent call last):
  File "a.py", line 1, in ?
    from b import BClass
  File "c:\usr\home\tony\ipbug\b.py", line 1, in ?
    from a import AClass
  File "c:\usr\home\tony\ipbug\a.py", line 1, in ?
    from b import BClass
ImportError: cannot import name BClass
DELL# IronPythonConsole a.py          <----------- This command
livelocks and never returns



More information about the Ironpython-users mailing list