[Zope3-dev] Importing

Martijn Faassen faassen@vet.uu.nl
Thu, 13 Dec 2001 00:04:42 +0100


Lalo Martins wrote:
> Sorry, I have to agree with Guido. If you don't want NodePath to be
> dependent on ParsedXML, then it shouldn't be a subpackage. Install it
> (in a Zope2 environment) in lib/python or even lib/python/Shared/Faassen.

But NodePath isn't dependent on ParsedXML right now. Only its unit
tests are. I could keep NodePath completely independent of things
just fine. If I have package A with subpackage B, and B has a subpackage C,
why does C have to be dependent on A while B does not? C is only
dependent on B, after all.

And why do I have to make people install 2 packages, one of which isn't
in Products, when previously I only had to distribute one? Don't we want
to avoid having to install product code outside of lib/python/Products?
Perhaps Zope Page Templates can get away with it, but I'd certainly get
wary if I had to install a non-ZC package that way. Not to mention
wondering at the presumption of the product author!

I'm writing modular code and life is being made harder for me because of
it. I could've just avoided the problem by placing the unit tests along
with the NodePath code, but the Zope guidelines expect a tests
subdir. Do I have to distribute two packages instead of one because I follow
the Zope unit testing guidelines?

Perhaps this isn't a Python problem but a Zope products distribution 
problem. But it's a problem people occasionally run into, obviously,
and perhaps Zope3 can make life easier in this respect. Or do you
and Guido reject these problems out of hand as non-issues? Granted
they're not world shattering difficulties. :)

Regards,

Martijn