[Zope-dev] Question: additional context for IAnnotations adapter?

Dan Korostelev nadako at gmail.com
Thu Mar 5 17:04:58 EST 2009


Hi there!

While looking at the zope.app.principalannotation package, I
discovered that both zope.annotation and zope.app.principalannotation
register their IAnnotations adapters twice: fisrt, as a simple adapter
and second, as a multi adapter for some additional context object.

The zope.annotation doesn't use that additional context at all - it
just allows to get annnotations by multi-adapter lookup. The
zope.app.principalannotation uses the additional context object as
context argument for getSiteManager, which I believe is not needed
and/or used in most cases, because application components, like
zope.site provide their hooks to get the right site manager.

There's no documentation or any tests for that behaviour neither in
zope.app.principalannotation, nor in zope.annotation, so I made an
assumption that these registrations are there just to support some
very old annotation pattern, that was deprecated ages ago. If it's
like that, I'd like to remove that registration for
zope.principalannotation that is about to born as well as for
zope.annotation.

Can someone clarify this point?

-- 
WBR, Dan Korostelev


More information about the Zope-Dev mailing list