[Distutils] [issue8] pkg_resources.declare_namespace inconsistency vs pkgutil.extend_path

Philip Jenvey setuptools at bugs.python.org
Fri May 9 23:49:53 CEST 2008


New submission from Philip Jenvey <pjenvey at underboss.org>:

Paste uses pkg_resources.declare_namespace:

>>> import sys
>>> import paste
>>> paste.__path__
['/usr/local/lib/python2.5/site-packages/Paste-1.6-py2.5.egg/paste',  
'/usr/local/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ 
paste', '/usr/local/lib/python2.5/site-packages/PasteScript-1.6.2- 
py2.5.egg/paste']
>>> del sys.modules['paste']
>>> import paste
>>> paste.__path__
['/usr/local/lib/python2.5/site-packages/Paste-1.6-py2.5.egg/paste']

Whereas pkgutil.extend_path does the right thing and restores  
paste.__path__ to contain the 3 paths

----------
keyword: pkg_resources
messages: 10
nosy: pjenvey
priority: bug
status: unread
title: pkg_resources.declare_namespace inconsistency vs pkgutil.extend_path

_______________________________________________
Setuptools tracker <setuptools at bugs.python.org>
<http://bugs.python.org/setuptools/issue8>
_______________________________________________


More information about the Distutils-SIG mailing list