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.



Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to