[z3-five] [Framework-Team] Re: five.intid compatible with five.localsitemanager
Ross Patterson
me at rpatterson.net
Sun Apr 15 19:41:07 CEST 2007
Martin Aspeli <optilude at gmx.net> writes:
> Ross Patterson wrote:
>> "Kapil Thangavelu" <k_vertigo at objectrealms.net> writes:
>>
>>> could explain why this change is nesc. to make five.intid work with
>>> five.lsm?
>>
>> FiveSiteManager doesn't cooperate with the resolution order of
>> PersistentComponents. For example a FiveSiteManagers utility registry
>> has no __bases__ attribute which raises an error in
>> zope/interface/ro.py:60. So if a site that uses localsitemanager (such
>> as Plone) is instantiated *after* the FiveSiteManager has been setup at
>> the application root by add_intids, then this error occurs.
>
> Is that not just a bug in five.lsm?
Well I don't know. As far as I can tell zope.interface.adapter base
registry code supports resolution orders, so I thought it was a bug in
FiveSiteManager *not* to support it. Are there any tests for
FiveSiteManager to verify that it serves properly as a base registry for
other registries?
>> Also, the registerUtility call in add_intids uses the old API and so
>> that raises an error when add_intids tries to register the IntIds
>> utility for a localsitemanager.
>
> Yes, you'd need to port the code to Zope 2.10-style persistent
> components (which is easy). I did think and hope that five.lsm would
> play with this, though.
Yes, five.lsm does play with it. It was five.intid that used the old
API. Maybe I'm misunderstanding you here?
Ross
More information about the z3-five
mailing list