[ZODB-Dev] ZODB 3.9.3 history call causing problems for storages that still accept version parameters

Chris Withers chris at simplistix.co.uk
Mon Nov 2 04:47:15 EST 2009


Christian Theune wrote:
> There's a size argument following the version which probably is not
> being passed as a keyword argument so it looks like a slight API
> incompatibility. I wonder whether ZEORaid should hack around that or
> whether the caller should be changed.

Hmm... looking more closely at the traceback, the caller is:

   File "ZODB3-3.9.3-py2.6-linux-i686.egg/ZEO/StorageServer.py", line 
1382, in history
     return self.storage.history(oid, size)

Now, ZODB 3.9 doesn't support versions, which is why the versions 
parameter has vanished, I guess?

However, I wonder if maybe this call should be:

self.storage.history(oid, size=size)

...to support storages which still accept a version parameter *and* 
newer ones that don't?

Looking at RelStorage:
http://svn.zope.org/relstorage/trunk/relstorage/storage.py?rev=105120&view=auto
...I can see it's going to have the same problem.

Would anyone object if I wrote a test and fixed this on the 3.9 branch 
of ZODB? I'm not really sure what to do about the trunk...

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk


More information about the ZODB-Dev mailing list