[issue26344] `sys.meta_path` Skipped for Packages with Non-Standard Suffixed `__init__` Files

Brett Cannon report at bugs.python.org
Thu Feb 11 18:01:22 EST 2016


Brett Cannon added the comment:

I'm at work and so I don't have access to tar on this machine ATM, so I can't look at your code example. But sys.meta_path might be one level above what you want; you might be looking for sys.path_hooks since https://docs.python.org/3/library/importlib.html#importlib.machinery.PathFinder is what searches entries on sys.path. This also means that if you don't put your finder on sys.meta_path before importlib.machinery.PathFinder then it will never pick up a directory since any directory will always be viewed as a namespace package by that meta path finder.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26344>
_______________________________________


More information about the Python-bugs-list mailing list