Jim Fulton wrote:

> - When we refactor zope.app.foo to be zope.foo (or something else),
> rather than changing
>    zope.app.foo to use zope.foo, just leave zope.app.foo alone, if possible.

One problem with this is that if you have interfaces for which there are 
components registered, this can make it impossible to support both packages.

For example, zope.app.container had IObjectAddedEvent. This is now in 
zope.lifecycleevent (it spent some time in zope.container, too, I think).

If I have a system where some packages use the "new" zope.lifecycleevent 
and fire events from there, and I have an event handler registered for 
zope.app.container.interfaces.IObjectAddedEvent, that won't get called, 
unless zope.app.container.interfaces.IObjectAddedEvent is a 
compatibility import for zope.lifecycleevent.IObjectAddedEvent.

This happened in Plone, by the way, when people started using things 
like z3c.form. So we certainly appreciated people changing zope.app.* in 
tandem with the refactoring. :)


Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book

Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to