From: SourceForge.net <no...@so...> - 2007-07-15 04:15:18
|
Bugs item #837308, was opened at 2003-11-06 11:02 Message generated for change (Settings changed) made by cgroves You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=837308&group_id=12867 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None >Group: targeted for 2.2rc2 Status: Closed Resolution: Fixed Priority: 4 Private: No Submitted By: Nicholas Brown (nwbrown) Assigned to: Nobody/Anonymous (nobody) Summary: Importing bug Initial Comment: If you try to import a module that does not exist, Jython will return an import error (as expected). But if you then create that module and try again without restarting Jython, you get the same error (CPython will allow this). In order to get that module Jython must be restarted. This can be an annoyance when using the interactive session, and can be a complete pain when using something like STAX which keeps Jython running in the background to make requests to. ---------------------------------------------------------------------- Comment By: Charles Groves (cgroves) Date: 2007-07-10 10:48 Message: Logged In: YES user_id=1174327 Originator: NO This is the same as http://jython.org/bugs/1747092, so it was fixed in r3287. Unfortunate that I rediscovered the spot to fix it after Leo already did it. ---------------------------------------------------------------------- Comment By: leouser (leouserz) Date: 2007-01-15 10:17 Message: Logged In: YES user_id=1277399 Originator: NO The problem appears to be that "imp" in its import_name method is setting the name of the module to Py.None if it can't find it the first time. This causes the system to block the import from that point onward: if (topMod == Py.None || topMod == null) { if (topMod == null) { modules.__setitem__(parentNameBuffer.toString().intern(), Py.None); } parentNameBuffer = new StringBuffer(""); // could throw ImportError topMod = import_first(firstName, parentNameBuffer, name, fromlist); } The question is, if this changed, what is going to be broken... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=837308&group_id=12867 |