[Python-Dev] PEP 382: Namespace Packages

P.J. Eby pje at telecommunity.com
Mon Apr 6 17:21:42 CEST 2009

At 02:00 PM 4/6/2009 +0100, Chris Withers wrote:
>Martin v. Löwis wrote:
>>Chris Withers wrote:
>>>Would this support the following case:
>>>I have a package called mortar, which defines useful stuff:
>>>from mortar import content, ...
>>>I now want to distribute large optional chunks separately, but ideally
>>>so that the following will will work:
>>>from mortar.rbd import ...
>>>from mortar.zodb import ...
>>>from mortar.wsgi import ...
>>>Does the PEP support this?
>>That's the primary purpose of the PEP.
>Are you sure?
>Does the pep really allow for:
>from mortar import content
>from mortar.rdb import something
>...where 'content' is a function defined in mortar/__init__.py and 
>'something' is a function defined in mortar/rdb/__init__.py *and* 
>the following are separate distributions on PyPI:
>- mortar
>- mortar.rdb
>...where 'mortar' does not contain 'mortar.rdb'.

See the third paragraph of http://www.python.org/dev/peps/pep-0382/#discussion

More information about the Python-Dev mailing list