[Zope-dev] Re: brain.getObject and traversal
Tres Seaver
tseaver at zope.com
Fri Apr 1 10:27:34 EST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Florent Guillaume wrote:
> Florent Guillaume <fg at nuxeo.com> wrote:
>
>>>>Unauthorized in getObject is out of the question, that would be new
>>>>behaviour.
>>>
>>>Well, in 2.8, new behaviour is expected, right?
>>>I really passionately believe that we should not be returnining None in
>>>Zope 2.8, and since 2.8 hasn't quite hit beta yet I'm very keen to see
>>>it fixed asap.
>>>
>>>Any objections?
>>
>>I'm ok for 2.8. I'll look at it.
>
>
> 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.
Tres.
- --
===============================================================
Tres Seaver tseaver at zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCTWhlGqWXf00rNCgRAsZ8AKChKf3YvASZ1jmJGeeN4Y3PN9/0rACbBRgi
nGNOyVocQywRINr8FnyNTHg=
=cUAs
-----END PGP SIGNATURE-----
More information about the Zope-Dev
mailing list