[Zope-CMF] Re: [dev] unresolved site manager related issues

Balazs Ree ree at ree.hu
Thu Apr 12 07:42:29 EDT 2007


On Thu, 12 Apr 2007 12:22:40 +0200 yuppie wrote:
 
> Balazs Ree wrote:

> That code is hard to read, but AFAICS the lists and dictionaries in the
> AdapterRegistry (_adapters, _subscribers, _provided) are looked up
> directly. Did anybody try to use customized lists and dictionaries for
> five.lsm that do the wrapping?

Afaik, noone tried that.

> Or can anybody tell me why that would be
> a bad idea? I guess performance might be a problem.

Actually it sounds like a smart idea first, but I don't see enough of 
zope internals to tell if that is feasible, it may or may not be. I hope 
someone else can give a deeper insight.


But even if the dictionary customization itself works out, I foresee 
another pitfall that both I and Rocky have met: at that point where that 
code operates, the site manager is not available. So the information, 
based on which the aq wrapper could be constructed, is missing. 

When we tried to solve the problem first with overwriting the lookup 
method of the registry, (which did not work since the method was 
sometimes skipped), we solved this with a minimal patch in the z3 level 
that passed this information (the site manager) as an extra parameter to 
the lookup method. So that it could use it for the wrapping. IoW we need 
to touch Zope in any case but that would not be a big deal.

But if I translate the same problem to the dictionary lookup you propose: 
I don't know how we would make this information available, since the 
dictionary lookup cannot take extra parameters.

I don't know if this can be solved in a smarter way, I just wanted to 
note that most likely we will stumble upon this issue again.

-- 
Balazs Ree



More information about the Zope-CMF mailing list