[ZODB-Dev] persistence errors with python2.5 64 bit linux

Shane Evans shane at 3continents.net
Tue Oct 16 06:14:21 EDT 2007


Hi,

I was looking at zodb for the first time and noticed a problem where 
persistent objects would be read and not have all their attributes.  A 
simple test case it attached (persistent_error.py).  It prints "not set" 
when I run it.

After a little poking it seems the error is with the use of int instead 
of Py_ssize_t. The attached patch fixed my problem - I thought I'd send 
it around in case it was of use to others. I noticed a few other places 
where int is also used in this context, it's probably worth changing 
everywhere and adding the appropriate "#if PY_VERSION_HEX" incantation.

Cheers,

Shane


-------------- next part --------------
A non-text attachment was scrubbed...
Name: persistent_error.py
Type: text/x-python
Size: 765 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zodb-dev/attachments/20071016/f0be6c9c/persistent_error.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: persistent.patch
Type: text/x-patch
Size: 1606 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zodb-dev/attachments/20071016/f0be6c9c/persistent.bin


More information about the ZODB-Dev mailing list