[Zope3-dev] packaging conventions note

Shane Hathaway shane@zope.com
Fri, 06 Dec 2002 11:42:30 -0500


Barry A. Warsaw wrote:
>>>>>>"SH" == Shane Hathaway <shane@zope.com> writes:
>     SH> Unfortunately, as you know, that convention clashes
>     SH> with Python's __init__.py, resulting in names being obscured.
> 
> Can you be more specific about clashes?  "from email.Parser import
> Parser" works just fine.

The clash is illustrated by Zope 2's DateTime module.  Because 
DateTime/__init__.py has a "from DateTime import DateTime" in it, the 
following statements are not equivalent:

from DateTime import DateTime
import DateTime.DateTime

This is rather disconcerting. :-)

>     SH> public.py / api.py provide a way to name the module and the
>     SH> class the same without the problems associated with doing so.
>     SH> But since it's possible to drop a public.py into any package
>     SH> without disturbing it, the real question is whether we
>     SH> *require* people to name their modules differently from their
>     SH> classes.  You're suggesting that we make such a requirement,
>     SH> but it seems harsh.  It's hard to guess at someone else's
>     SH> abbreviations.
> 
> I'm -1 on such a requirement, but I doubt it would be required.
> Whatever the Zope Pope decides is right for Zope is fine with me too.
> If I can adapt <> style to != style, I can adapt to local naming
> conventions. :)

Sure, I can too.  Zope 3 won't be as easy to navigate as it could have 
been, but that won't matter once we're all familiar with the code.

Shane