Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Properly implement PEP 302 in the module_loading module. For unknown …

…reasons this doesn't actually raise an error under CPython, but PyPy does, and the currently implementation is clearly in violation of the PEP, which states that finder.find_module's second argument is either None or package.__path__ and imp.find_module whose second argument should be either None or a list of paths.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16531 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4c5c8dca315058e2400104be0438af22a3ed61cf 1 parent 723b574
@alex alex authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/utils/module_loading.py
View
2  django/utils/module_loading.py
@@ -12,7 +12,7 @@ def module_has_submodule(package, module_name):
except KeyError:
pass
for finder in sys.meta_path:
- if finder.find_module(name, package):
+ if finder.find_module(name, package.__path__):
return True
for entry in package.__path__: # No __path__, then not a package.
try:
Please sign in to comment.
Something went wrong with that request. Please try again.