[Zope-dev] Re: Deprecating Zope 2 interfaces?

yuppie y.2006_ at wcm-solutions.de
Tue Feb 21 07:12:36 EST 2006


Hi Philipp!


Philipp von Weitershausen wrote:
> I don't think it will make much sense to keep Zope 2 interfaces around
> for more than one year from now. In other words, I'm suggesting to
> deprecate them for Zope 2.10.

+10

But we can't deprecate z2 interfaces as long as Zope 2 itself uses them 
for other tasks than providing backwards compatibility. There are still 
some unconverted z2 interfaces in Zope 2.

> 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.

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.

> 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. There should be no need to use z2 interfaces in products 
written for Zope 2.9.

> 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.


Cheers,

	Yuppie



More information about the Zope-Dev mailing list