[Zope-dev] Re: brain.getObject and traversal

Florent Guillaume fg at nuxeo.com
Fri Apr 1 22:31:47 EST 2005


Tres Seaver  <tseaver at zope.com> wrote:
> > Is everyone ok with returning
> >  - the object if it can be accessed
> >  - raise Unauthorized if it can't be accessed
> >  - raise NotFound if it's not there
> > and never return None ?
> > 
> > I'll change that before tomorrow, for 2.8a2.
> > 
> > (I'll change NotFound in Traversal.py to a real exception instead of a
> > string too, I thought we'd killed those.)
> 
> We really need to follow a deprecation-style model here:  the risk of
> breaking major third party components is pretty high.
> 
> Could we use a module-scope global, settable from zope.conf, to indicate
> which strategy to use?  It should (for 2.8) default to raising, but we
> need to be prepared for an onslaught of breakage reports.
> 
> The CHANGELOG should highlight the change, and include the zope.conf
> snippet required to restore the old behavior.  We could add a
> deprecation warning (if that entry is activated), that the old-style
> option would be removed in 2.10.

Ok, thanks a lot to Tres for having gone ahead and done that. I just
merged his branch. All 5645 tests pass (man, with Zope 3 included that's
way more than before!)

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com


More information about the Zope-Dev mailing list