Author cemasoniv
Recipients cemasoniv
Date 2009-08-03.20:36:01
SpamBayes Score 1.04428e-12
Marked as misclassified No
Message-id <>
Steps to reproduce:

1) Add to sys.path a path that does not exist
2) Import a module, any module.  This invokes get_path_importer over
every element of sys.path.  The NullImporter __init__ method is called
and an instance created for each non-existing path element in sys.path.
3) Create the path and put a valid module in said path
4) Try to import that module.

Behavior is that the interpreter fails to import.  This behavior seems
local to import.c only.

Attached a test case that shows "failed" for 2.5, 2.6, 3.0. 3.1rc1+.  I
have yet to test on the trunk but I can/will do that if necessary.

I believe I can fix this myself but I want to verify this is incorrect
behavior (a bug) and not an "Undocumented Feature" (or hell, maybe it
*is* documented somewhere).  I've skimmed over PEP 302 and didn't see
any relevant information.

If someone gives me the go ahead (or at least doesn't give me reason not
to), I'll get a patch put together, perhaps for several different "fixes".
Date User Action Args
2009-08-03 20:36:14cemasonivsetrecipients: + cemasoniv
2009-08-03 20:36:13cemasonivsetmessageid: <>
2009-08-03 20:36:02cemasonivlinkissue6636 messages
2009-08-03 20:36:01cemasonivcreate