"namespace" vs "module" packages (was Re: [Zope3-dev] packaging conventions note)

Casey Duncan casey@zope.com
Sun, 15 Dec 2002 12:38:57 -0500


----- Original Message -----
From: "Jim Fulton" <jim@zope.com>
To: "Tres Seaver" <tseaver@zope.com>
Cc: "Guido van Rossum" <guido@python.org>; <stephan.richter@tufts.edu>;
"Martijn Faassen" <faassen@vet.uu.nl>; <zope3-dev@zope.org>
Sent: Friday, December 13, 2002 4:44 PM
Subject: "namespace" vs "module" packages (was Re: [Zope3-dev] packaging
conventions note)
[snip]
>
> Some packages exist to provide a separate namespace.  The Zope (zope)
> and ZopeProducts (zopeproducts) packages are like this.  Namespace
> packages should not export any names from their __init__ modules.  It
> should be possible to distribute sub-packages or submodules of these
> independently.  I would even say that namespace packages should allow
> themselves to be spread over multiple physical locations.  For
> example, I want the zope and zopeproducts packages to have an __init__
> that arranges for all zope and zopeproducts directories found on the
> Python path to be added to the respective package paths,

This is fine except for the explicit relative import problem. If I yank a
subpackage out of Zope (lets say it has no other Zope package dependancies)
and try to use it by itself I'll have to diddle with all the imports before
it will work, at the least the ones in the unit tests. That's kinda lame.

-Casey