﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
15662	module_has_submodule incorrectly uses the Importer Protocol	Bradley Ayers <bradley.ayers@…>	nobody	"django.utils.module_loading.module_has_submodule has the code:

{{{
for finder in sys.meta_path:
    if finder.find_module(name):
        return True
}}}

where `name` is the absolute path to the module that should be imported. However PEP302 that defines the Importer Protocol says that a second argument must be supplied if the module isn't directly on `sys.path`.

Thus, the code should be:

{{{
for finder in sys.meta_path:
    if finder.find_module(name, package):
        return True
}}}

I came across this problem with using Attest, Django, and loading a template tag that had the same name as a package on my PATH.
"	Bug	closed	Core (Other)	1.2	Normal	fixed		lrekucki@…	Ready for checkin	1	0	0	0	0	0
