Package Organization (was Re: [Zope3-dev] Voting on Schema design)

Barry A. Warsaw barry@zope.com
Mon, 15 Jul 2002 13:09:14 -0400


>>>>> "JF" == Jim Fulton <jim@zope.com> writes:

    JF> Zope is a pure container package containing useful packages
    JF> created as part of the Zope project. Packages the depend on
    JF> the Zope application, or that have excessive dependencies on
    JF> other Zope packages should go in the Zope.App package.

Maybe App should be moved out of Zope?  That's another thing that
always confuses me.  If lib/python/Zope is the catch all for packages
useful outside of Zope, then why lib/python/Zope/App?  (Oh, exception
proving the rule? :).

    JF> The Zope package is motivated by name conflicts that *did*
    JF> occur early on with modules from other projects. The Zope
    JF> project should inflict as few names on the top-level Python
    JF> namespace as possible.

    JF> Consider this a Papel edict. :)

That's why I've given up the battle <wink>.

    JF> Now, there are, as always, exceptions to the rule. Some
    JF> packages have a ver strong identity outside of Zope, so I've
    JF> put them in the global namespace. For example, the Interface
    JF> package was proposed at IPC 7 in Houston, in 1998. This
    JF> proposal, and the software release that followed soon after,
    JF> specified a top-level package.

    JF> One could argue that the ZODB packages should move into Zope.

There's one technical glitch which might argue against a Zope
top-level placeholder.  If you ever want to import some Zope.PackageA
from a different directory than Zope.PackageB you will be stuck
because Python won't search two directories for a package's contents.
This might be an issue if you've got extensions installed in a
different location than pure-Python code, or if you want Zope.PackageA
from your site-packages location, but Zope.PackageB from your Zope
installation.

By moving the packages out of the Zope placeholder, you can at least
control this on a per-package basis as opposed to everything under the
Zope placeholder package.  That might just be to coarse a granularity.

-Barry