[Zope-dev] Proposal: move zope.site.next functions to zope.component.

Dan Korostelev nadako at gmail.com
Wed Mar 11 18:02:39 EDT 2009


Hey, people!

While working on splitting authentication interfaces and
PrincipalSource from zope.app.security to new zope.authentication
package, I discovered that PrincipalSource uses some functions from
zope.site, which is unacceptable dependency.

Those functions are "getNextUtility" and "queryNextUtility" and they
are all that is contained in the "zope.site.next" module. What they do
is looking up an utility in the __bases__ of given component registry,
so returning a "higher" level utility.

That functionality doesn't depend in any way on persistency or
locatability of component registries and can be very useful with plain
zope.component's registries. Moreover, it does use an implementation
detail of zope.component.registry.Components class - the __bases__
attribute. :-)

So, I propose to move this tiny (see for yourself) functionality to
the "zope.component" package, so code that needs it wouldn't depend on
zope.site.

If there won't be any objections, I'll do that.

-- 
WBR, Dan Korostelev


More information about the Zope-Dev mailing list