[Zope-dev] Re: Deprecating Zope 2 interfaces?
yuppie
y.2006_ at wcm-solutions.de
Tue Feb 21 07:54:45 EST 2006
Hi Philipp!
Philipp von Weitershausen wrote:
> yuppie wrote:
>>> There are a few places in Zope 2 where they are still used for checks
>>> (mostly webdav, OFS, ZCTextIndex).
>> In detail these are:
>>
>> 1.) WriteLock: Objects are only lockable if their class has
>> WriteLockInterface in its __implements__ list.
>
> OFS.PropertySheets also does this.
>
>> 2.) PluggableIndex: Indexes for ZCatalog have to be registered in
>> Products.meta_types with PluggableIndexInterface.
>>
>> 3.) IFAwareObjectManager and the 'interfaces' argument of
>> ObjectManager.all_meta_types: The mechanism used for pluggable indexes
>> has a generic implementation in ObjectManager and can be used by any
>> subclass of IFAwareObjectManager.
>
> Thanks for tracking those down. According to a search for
> 'isImplementedBy' (the old interface API method), there's also:
>
> 4) OFS.DTMLMethod and ZPublisher.HTTPResponse check for IStreamIterator
>
> 5) Products.Trancience checks for TransientItemContainer (no leading I)
>
> We should put #BBB comments to all of those locations so we won't forget.
Well. All those locations import z2 interfaces so it should be quite
easy to find them as soon as the z2 interfaces are removed.
>>> For the deprecation period, these
>>> checks will have to be done against both the Zope 2 and the Zope 3
>>> interface.
>> In Zope 2.9 these mechanisms already work alternatively with z3
>> interfaces.
>
> Not all of them but most of them.
I just meant those 3 mechanisms on my list. 4) and 5) are not migrated,
but there should not be many third party products that depend on them.
>>> I think this is as hard as it gets for the switch-over to
>>> Zope 3 interfaces, but perhaps I'm missing something.
>> Don't think so. But there might be other z2 interfaces in use.
>
> Sure, which is why we have the deprecation period for 12 months after
> the Zope 2.10 release so that 3rd party software has time to switch.
Sure. I meant in use in Zope 2 itself. But your search for
'isImplementedBy' should have revealed most of them.
> Though I believe that most of the big projects have already switched
> their interfaces to Zope 3 ones, only keeping the old ones for
> backward-compat.
Zope 2.8 compatible products still have to use WriteLockInterface and z2
interfaces for IFAwareObjectManager.
Cheers,
Yuppie
More information about the Zope-Dev
mailing list