[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a
Brett Cannon
report at bugs.python.org
Sat Jun 2 19:40:12 CEST 2012
Brett Cannon <brett at python.org> added the comment:
Basically pkgutil kind of handles importers properly, kind of doesn't. So if a module defined a __loader__ it will use it, but all the rest of its code assumes it uses only the loaders defined in pkgutil.
The problem here is that pkgutil.walk_packages() ends up calling iter_importer_modules() which only returns anything of consequence if the loader has iter_modules() defined which is a non-standard API requirement that only pkgutil loaders has implemented. Basically the docs for pkgutil were incorrect in not specifying that the walk only works for loaders that define iter_modules().
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14982>
_______________________________________
More information about the Python-bugs-list
mailing list