[Python-checkins] python/nondist/sandbox/setuptools pkg_resources.py, 1.69, 1.70

pje@users.sourceforge.net pje at users.sourceforge.net
Fri Aug 19 03:02:04 CEST 2005


Update of /cvsroot/python/python/nondist/sandbox/setuptools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18276

Modified Files:
	pkg_resources.py 
Log Message:
Fix namespace packages not getting fixed up when the eggs are zipped and
loaded late (i.e. via require).  Thanks to Walter Doerwald for the bug
report.


Index: pkg_resources.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/pkg_resources.py,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- pkg_resources.py	14 Aug 2005 21:01:33 -0000	1.69
+++ pkg_resources.py	19 Aug 2005 01:01:53 -0000	1.70
@@ -1429,8 +1429,8 @@
     handler = _find_adapter(_namespace_handlers, importer)
     subpath = handler(importer,path_item,packageName,module)
     if subpath is not None:
-        module.__path__.append(subpath)
-        loader.load_module(packageName)
+        path = module.__path__; path.append(subpath)
+        loader.load_module(packageName); module.__path__ = path
     return subpath
 
 def declare_namespace(packageName):



More information about the Python-checkins mailing list