Title: Circular imports cause RuntimeError: maximum recursion depth exceeded
Type: crash Severity: major
Components: Core Versions: Jython 2.7
Status: open Resolution: accepted
Dependencies: Superseder:
Assigned To: jeff.allen Nosy List: Lonebuddha, fwierzbicki, jeff.allen, zyasoft
Priority: high Keywords:

Created on 2009-08-05.10:56:09 by Lonebuddha, last changed 2015-04-19.22:40:52 by jeff.allen.

File name Uploaded Description Edit Remove Lonebuddha, 2009-08-05.10:56:09 Circular imports use case
msg4989 (view) Author: Andrey Sukhanov (Lonebuddha) Date: 2009-08-05.10:56:09
In case of circular imports Python shows "ImportError: cannot import
name <>" error and a stack trace, but Jython fails with "RuntimeError:
maximum recursion depth exceeded".

Use case description.
1. I have a package.
2. There are two modules in the package.
3. First one does "from . import <second module>"
4. Second one does "from . import <first module>"

See an example in the attached file. Try to run "".
msg8468 (view) Author: Jim Baker (zyasoft) Date: 2014-05-21.20:43:03
Target beta 4
Date User Action Args
2015-04-19 22:40:52jeff.allensetassignee: jeff.allen
nosy: + jeff.allen
2014-07-01 04:06:54zyasoftsetpriority: high
2014-05-21 20:43:03zyasoftsetnosy: + zyasoft
messages: + msg8468
2014-05-04 20:28:06zyasoftsettitle: Unexpected behaviour is case of circular imports -> Circular imports cause RuntimeError: maximum recursion depth exceeded
2014-05-04 20:27:11zyasoftsetresolution: remind -> accepted
2013-02-19 20:48:03fwierzbickisetresolution: remind
versions: + Jython 2.7, - 2.5.0
2009-08-06 14:59:00fwierzbickisetnosy: + fwierzbicki
2009-08-05 10:56:09Lonebuddhacreate