[Zope-dev] Proposal: set __parent__ and __name__ in Zope 2.12 OFS

Hanno Schlichting hannosch at hannosch.eu
Mon Apr 27 08:22:48 EDT 2009


Andreas Jung wrote:
> I have no problem with the changes. You have my blessing if Hanno is ok
> with the changes from the Plone prospective.

I'm OK with the changes from the Plone perspective.

I do however have a concern from the Zope perspective ;)

What I'm worried about is what kind of migration we need for this to
happen and what kind of impact this can have on derived types which
might override the methods in question.

If someone overwrites _setOb and _delOb in custom classes without
calling the methods on the base classes or hasn't fully bought into the
events story, I'm a bit worried we get hard to track down
inconsistencies in the parent pointers.

Since these pointers will take precedence over any even manually crafted
Acquisition chains, certain operations might no longer be possible. An
object with parent pointers will have its real physical path as its
context. In the way Acquisition used to be used, it was quite possible
to change the context of things by crafting different AQ chains.

I'm quite certain that none of the code in Plone or on the CMF level has
such problems. But I have no idea what kind of code is out there in the
wild based on Zope2.

Hanno



More information about the Zope-Dev mailing list