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

Christian Theune ct at gocept.com
Mon Nov 2 04:50:51 EST 2009


On 11/02/2009 10:47 AM, Chris Withers wrote:
> 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...

I think that's the best idea. It's not exactly part of the policy of
supporting old protocols but if we want to support and encourage 3rd
party storage implementations we should leverage this simple fix for
better backwards compatibility.

Christian

-- 
Christian Theune · ct at gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development


More information about the ZODB-Dev mailing list