[ZODB-Dev] Inconsistent use of ConflictError

Chris McDonough chrism@zope.com
Fri, 17 Aug 2001 10:22:12 -0400


Greg Ward wrote:
> 
> On 17 August 2001, Chris McDonough said:
> > This is pretty cool.. on the Zope side, we'll need to go clean up some
> > places where  we do dumb things (like "errorobj is ConflictError"), but
> > this looks far better than what exists.
> 
> Umm, yeah, I didn't think of that.  Is it OK if I restrict myself to
> just the code in StandaloneZODB?  I don't see how "errorobj is
> ConflictError" could have possibly worked in all the days that
> ConflictError has been a class, anyways.

I *think* it's ok to restrict yourself to the code in StandaloneZODB...
I dont know how Andrew handles syncing up... we'll need a little time to
audit and test the Zope code against the new semantics, but that
shouldn't stop you or Andrew nor anyone else from innovating...
(backwards compatibility is a b*tch, isnt it?)

Of course Jim (as always) has the last word. ;-)

> > I wonder how to keep it this way as new storages hit the pike.
> 
> Well, it's still technically legal to
>   raise ConflictError, `oid`
> because that's equivalent to
>   raise ConflictError(message=`oid`)
> which would generate an error message no worse than the current code
> does.  It's just failing to use my pumped-up ConflictError.

OK, that's good..
 
> However, my hunch is that 1) people likely to write new storages
> probably read zodb-dev, and 2) they might actually look at the
> definition of ConflictError before raising it willy-nilly.  I mean,
> reading a class' docstring before instantiating that class is not a
> difficult concept.  ;-)

I wonder if Zope's interface module could capture these requirements.  I
think it can.
 
-- 
Chris McDonough                           Zope Corporation
http://www.zope.org                    http://www.zope.com

""" Killing hundreds of birds with thousands of stones """