From: Martin v. Löwis Date: Tue, 13 Feb 2007 08:35:01 +0000 (+0000) Subject: Patch #685268: Consider a package's __path__ in imputil. X-Git-Tag: v2.5.1c1~115 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ef67690eac7ada908a04e5d0d7c32c98fe941480;p=thirdparty%2FPython%2Fcpython.git Patch #685268: Consider a package's __path__ in imputil. --- diff --git a/Lib/imputil.py b/Lib/imputil.py index 8a49bb14ff65..675a634db306 100644 --- a/Lib/imputil.py +++ b/Lib/imputil.py @@ -552,6 +552,10 @@ class _FilesystemImporter(Importer): # This method is only used when we look for a module within a package. assert parent + for submodule_path in parent.__path__: + code = self._import_pathname(_os_path_join(submodule_path, modname), fqname) + if code is not None: + return code return self._import_pathname(_os_path_join(parent.__pkgdir__, modname), fqname) diff --git a/Misc/NEWS b/Misc/NEWS index c79f0b5fd1cc..db784943add0 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -169,6 +169,8 @@ Extension Modules Library ------- +- Patch #685268: Consider a package's __path__ in imputil. + - Patch 1463026: Support default namespace in XMLGenerator. - Patch 1571379: Make trace's --ignore-dir facility work in the face of