Re: [ZODB-Dev] Problem Storing Infinity

2006-09-13 Thread Dieter Maurer
Jim Fulton wrote at 2006-9-12 15:27 -0400: > ... >Plus version 0 pickles are more readable. :) Honestly. But very inefficient. I remember having analysed a peculiar effect reported by Andreas: Transfering large binary file objects between Zope and ZEO took excessive time. I found the cau

Re: [ZODB-Dev] Problem Storing Infinity

2006-09-12 Thread Jim Fulton
On Sep 12, 2006, at 3:07 PM, Tim Peters wrote: [David Binger] That's interesting. It appears that pickle protocol 2 chokes on inf. [Tim Peters] As above. BTW, why protocol 2 specifically? Protocols 1 and 2 treat floats the same way. [David] I was thinking that the default protocol is

Re: [ZODB-Dev] Problem Storing Infinity

2006-09-12 Thread Tim Peters
[David Binger] That's interesting. It appears that pickle protocol 2 chokes on inf. [Tim Peters] As above. BTW, why protocol 2 specifically? Protocols 1 and 2 treat floats the same way. [David] I was thinking that the default protocol is 1, but I see now that the default is 0. Strange,

Re: [ZODB-Dev] Problem Storing Infinity

2006-09-12 Thread David Binger
On Sep 12, 2006, at 2:11 PM, Tim Peters wrote: [David Binger] That's interesting. It appears that pickle protocol 2 chokes on inf. As above. BTW, why protocol 2 specifically? Protocols 1 and 2 treat floats the same way. I was thinking that the default protocol is 1, but I see now that th

Re: [ZODB-Dev] Problem Storing Infinity

2006-09-12 Thread Tim Peters
[Chris S] I'm having a problem storing infinity. The following code reproduces the problem on w2k: Purely a Python issue. Nothing about the behavior of infinities, NaNs or signed zeroes is defined in Python before (the not yet released) 2.5. In 2.5, marshal and pickle (but only with protocol

Re: [ZODB-Dev] Problem Storing Infinity

2006-09-12 Thread Dieter Maurer
Chris S wrote at 2006-9-12 11:38 -0400: > ... >return self._dump(meta, obj.__getstate__()) > File "C:\Program >Files\Python24\Lib\site-packages\ZODB\serialize.py", line 416, in >_dump >self._p.dump(state) >SystemError: frexp() result out of range Tim (Peters) explained several problems wi

Re: [ZODB-Dev] Problem Storing Infinity

2006-09-12 Thread Jim Fulton
On Sep 12, 2006, at 11:55 AM, David Binger wrote: That's interesting. It appears that pickle protocol 2 chokes on inf. ->> from cPickle import dumps ->> dumps(1e9) 'Finf\n.' ->> dumps(1e9, 2) Traceback (most recent call last): File "", line 2, in ? SystemError: frexp(

Re: [ZODB-Dev] Problem Storing Infinity

2006-09-12 Thread David Binger
That's interesting. It appears that pickle protocol 2 chokes on inf. ->> from cPickle import dumps ->> dumps(1e9) 'Finf\n.' ->> dumps(1e9, 2) Traceback (most recent call last): File "", line 2, in ? SystemError: frexp() result out of range ->> _

[ZODB-Dev] Problem Storing Infinity

2006-09-12 Thread Chris S
I'm having a problem storing infinity. The following code reproduces the problem on w2k: from ZODB import FileStorage, DB from persistent import Persistent from persistent.mapping import PersistentMapping as dict import transaction storage = FileStorage.FileStorage('zodb.db') db = DB(storage) co