[Python-checkins] r53763 - in python/trunk: Lib/imputil.py Misc/NEWS

martin.v.loewis python-checkins at python.org
Tue Feb 13 09:34:46 CET 2007


Author: martin.v.loewis
Date: Tue Feb 13 09:34:45 2007
New Revision: 53763

Modified:
   python/trunk/Lib/imputil.py
   python/trunk/Misc/NEWS
Log:
Patch #685268: Consider a package's __path__ in imputil.
Will backport.


Modified: python/trunk/Lib/imputil.py
==============================================================================
--- python/trunk/Lib/imputil.py	(original)
+++ python/trunk/Lib/imputil.py	Tue Feb 13 09:34:45 2007
@@ -552,6 +552,10 @@
         # 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)
 

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Tue Feb 13 09:34:45 2007
@@ -128,6 +128,8 @@
 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


More information about the Python-checkins mailing list