[Zope-dev] Re: zope.traversing dependencies

Tres Seaver tseaver at palladion.com
Tue Nov 20 15:35:45 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thomas Lotze wrote:
> I just noticed that zope.traversing depends on dozens of packages,
> most of them (including a lot of zope.app stuff and the ZODB) only through
> the dependency on zope.app.applicationcontrol. According to the
> zope.traversing code, the only occasion on which zope.traversing needs
> zope.app.applicationcontrol is if some special name is to be traversed in
> the etc namespace.
> 
> I suggest trying to import zope.app.applicationcontrol in that case
> instead of doing it unconditionally, and passing if an ImportError is
> raised. AFAICS this would result in the names simply not being available
> if the application controller isn't, which seems sensible to me.
> 
> I think it is in favour of this suggestion that a comment above the
> application controller lookup states that the hard-coding was meant only
> as a preliminary measure until "some sort of registry" takes its place.
> 
> Unless I overlooked something, this rather simple change would do no harm
> while shedding a large number of dependencies.
> 
> Opinions?

+100 to shedding the dependencies.  Could we have the conditional import
work as a fallback to a utility lookup?  And then change
'zope.applicationcontrol' to register such a utility?


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHQ0Uh+gerLs4ltQ4RAqPZAJ9dRnthdxB3B8rKxhlF59IZOyJ+/gCgyfNn
wTlnEgYTPqfkZL9o7rfK5wU=
=FILi
-----END PGP SIGNATURE-----



More information about the Zope-Dev mailing list