logilab-common #177651 nested namespace packages (extend_path) cannot be imported [validation pending]

extend_path support for namespace packages doesn't work if there are two or more levels of namespace packages above the module to be imported.

dist_dir_1/
..outer/
....__init__.py (with extend_path)
....inner/
......__init__.py (with extend_path)
......module1.py

dist_dir_2/
..outer/
....__init__.py (with extend_path)
....inner/
......__init__.py (with extend_path)
......module2.py

Current code in _module_file() near end of modutils.py will search sys.path for 'inner' instead of searching sys.path for 'outer/inner'

prioritynormal
typebug
done in0.60.1
load left0.000
closed by#14436aa69ef0 [modutils] fix support for extend_path based namespace package when module is nested in a sub-package. Closes #177651
patch[modutils] fix support for extend_path based namespace package when module is nested in a sub-package. Closes #177651 [applied]
attachment