[Zope3-dev] interface package changes

Kapil Thangavelu hazmat at objectrealms.net
Sat May 8 00:04:16 EDT 2004


On Fri, 2004-05-07 at 16:57, Martijn Faassen wrote:
> Gary Poster wrote:
> > 
> > 
> > Martijn Faassen wrote:
> > 
> >> Definitely agreed it should work on ExtensionClass, as I want to use 
> >> it in a Zope 2.7 context. :)
> > 
> > :-)
> > 
> >> I'll do some tests in Zope 7 with Silva soon (switching it over to use 
> >> Zope 3 interfaces experimentally).
> >  
> > Dang, if you have Zope 7, what do you need Zope 3 for? ;-)
> 
> I can report success (see below), so that means we can start applying 
> chunks of Zope 3 inside Zope 2.7. The only thing necessary to get it 
> going is by adding a little path directive in your zope config file 
> pointing to a Zope3 src directory.
> 
> >> If this ExtensionClass compatibility code is unrelated to the 
> >> backwards compatibility code which handles an explicit __implements__ 
> >> (like in Zope 2 interfaces) then I hope we can get rid of that. If not 
> >> and the implements() hackery doesn't work on ExtensionClass, I'll have 
> >> to do some more research on how to proceed. I did some experiments in 
> >> the past and I *think* I had implements() working in Zope 2, but I'll 
> >> do another experiment. 
> > 
> > Please do (and let us know how it turns out), but I think you're right.
> 
> I can Zope 3 interfaces in Zope 2 in Silva now (using the 
> faassen-interfaces-branch). I have a Silva version that uses Zope 3 
> interfaces throughout, and it seems to work just fine in my first 
> testing. I get tons of DeprecationWarnings but those are easily fixed by 
> starting to use providedBy instead of isImplementedBy and the like.
> 
> So this looks like there is no obstacle to starting to use adapters and 
> the like on the Python level in Zope 2.7. We can start hollowing out 
> Zope 2 applications from the inside and replacing them with shiny new 
> Zope3-ish interiors now.
> 
> Does this mean we can start ripping out the __implements__ backwards 
> compatibility facilities from zope.interface? (keeping in the 
> ExtensionClass stuff of course)
> 
> > If all else fails we might be able to slam Zope 3 stuff in 
> > __implemented__ directly, but that would be pretty unfortunate to lose 
> > the protection of the indirection.
> > 
> > The Zope 2 webdav interface is the only thing I remember needing in the 
> > __implements__ bag, and that should be easy enough.
> 
> It's certainly possible to still use the __implements__ bag. You can use 
> them together with implements() in a Zope 2 application if you really 
> have to.

i haven't had time to really dig into this the last week ( and none in
sight for another week) but i wanted to comment on this.

one of the important items for merging in z3 interfaces to z2 is
maintaining compatiblity with existing interface declarations and usage
(although replacing broken parts with working ones is not a backwards
compatiblity issue). as part of this the existing z2 interfaces will go
the way of the dodo to be replaced by a proxy package implmentation that
defer to z3 interfaces, an implementation that jim wrote last year,

http://cvs.zope.org/Packages3/Interface/

if removing __implements__ support from z3.interfaces will break
compatiblity with existing z2 declarations, then it needs to be
reconsidered.

cheers,

kapil




More information about the Zope3-dev mailing list