Issue1423

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

Created on 2009-08-05.10:56:09 by Lonebuddha, last changed 2014-07-01.04:06:54 by zyasoft.

Files
File name Uploaded Description Edit Remove
circular_imports.zip Lonebuddha, 2009-08-05.10:56:09 Circular imports use case
Messages
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 "main.py".
msg8468 (view) Author: Jim Baker (zyasoft) Date: 2014-05-21.20:43:03
Target beta 4
History
Date User Action Args
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