[issue45591] PathFinder does not find namespace packages children

Brett Cannon report at bugs.python.org
Mon Oct 25 15:16:44 EDT 2021


Brett Cannon <brett at python.org> added the comment:

You didn't specify the path to search in to find `a`. https://docs.python.org/3/library/importlib.html#importlib.machinery.PathFinder.find_spec says that PathFinder only has class methods, which means find_spec() won't know where 'namespace' is, so the search will fail to find anything, hence returning None.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45591>
_______________________________________


More information about the Python-bugs-list mailing list