[Zope3-dev] directory hierarchy proposal

holger krekel pyth@devel.trillke.net
Mon, 16 Dec 2002 23:02:40 +0100


Phillip J. Eby wrote:
> At 03:28 PM 12/16/02 +0100, holger krekel wrote:
> 
> >My main concern is basically that in a more complex (e.g. developer's setup)
> >you have two modules with the same name in your pythonpath.
> 
> Actually, no, you won't.  sys.path only contains directories, not modules 
> or packages.

i meant two identical names for modules contained in PYTHONPATH directories.

> >thanks for the explanation.  IMO without further checks (e.g. warnings for
> >duplicate names in different locations) this can be very confusing
> >especially if you are remotely analyzing a customer problem who might
> >have installed lots of stuff and has a path with many items.
> 
> How is that different from PYTHONPATH now?  

you ripped out one part of my mail:

>> PYTHONPATH ordering are a source for many problems on c.l.py.
>> The namespace-collecting mechanism would make it worse, i suspect.

Even without playing any tricks on __path__, __file__, CWDs and friends 
there is a lot of confusion.  If you don't believe it try

    google: package import group:comp.lang.python

I don't think that gathering subdirectories from the PYTHONPATH would
anything but deepen the confusion. 

    "I have a current Zope3 from XXX, everything works but it sometimes
     fails with weird security problems (a long traceback follows)."

    (15 posts later)

    "Oh yes, the security stuff from your Zope3 directory wasn't used 
     but some other 7 month old version in another directory which
     happended to be in your sys.path ..."

regards,

    holger