[Zope3-dev] directory hierarchy proposal

Barry A. Warsaw barry@zope.com
Sun, 15 Dec 2002 22:39:28 -0500


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

    >> What about the convention that namespace package __init__.py
    >> say something like this: # this is a namespace package, please
    >> keep __init__.py empty of code This way anybody tempted to add
    >> stuff to an __init__.py where they shouldn't will be made aware
    >> immediately that they shouldn't do that.

    JF> This is a good idea, It will need to be modified slightly,
    JF> since it will contain some boilerplate code to knit all
    JF> directories of the same name on the Python path into a single
    JF> logical module.

My biggest fear is that if there's anything more than a copyright
comment in __init__.py, and different packages overwrite
zope/__init__.py or zodb/__init__.py, we're going to get version skew
pretty quickly.  That boilerplate is going to change and each
individual package is going to have a slightly different version of
the boilerplate.  I'd hate to have an up-to-date zodb package, then
install SpoogyStorage with an older (or newer!) __init__.py that broke
things.

Maybe we can write some distutils code so that a new package will
never overwrite namespace package's __init__.py file.

-Barry