[ python-Bugs-1228015 ] cPickle and pickle dump bug (inf float)

SourceForge.net noreply at sourceforge.net
Mon Jun 27 12:22:11 CEST 2005


Bugs item #1228015, was opened at 2005-06-27 05:30
Message generated for change (Comment added) made by mwh
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1228015&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Andrea Bolzonella (bolzonella)
>Assigned to: Michael Hudson (mwh)
Summary: cPickle and pickle dump bug (inf float)

Initial Comment:
An "inf float" can't be dumped in binary form. 
 
Python 2.4.1 (#1, Jun 10 2005, 16:30:55) 
[GCC 3.3.3 (SuSE Linux)] on linux2 
Type "help", "copyright", "credits" or "license" for more 
information. 
>>> import pickle 
>>> import cPickle 
>>> pickle.dumps (10e5000) 
'Finf\n.' 
>>> pickle.dumps (10e5000, pickle.HIGHEST_PROTOCOL) 
Traceback (most recent call last): 
  File "<stdin>", line 1, in ? 
  File "/home/bolz/DLD/lib/python2.4/pickle.py", line 1386, in 
dumps 
    Pickler(file, protocol, bin).dump(obj) 
  File "/home/bolz/DLD/lib/python2.4/pickle.py", line 231, in 
dump 
    self.save(obj) 
  File "/home/bolz/DLD/lib/python2.4/pickle.py", line 293, in 
save 
    f(self, obj) # Call unbound method with explicit self 
  File "/home/bolz/DLD/lib/python2.4/pickle.py", line 489, in 
save_float 
    self.write(BINFLOAT + pack('>d', obj)) 
SystemError: frexp() result out of range 
>>> 

----------------------------------------------------------------------

>Comment By: Michael Hudson (mwh)
Date: 2005-06-27 11:22

Message:
Logged In: YES 
user_id=6656

Why has this suddenly become a common bug report?

Anyway, this should work in CVS HEAD (please test!).  The changes are 
unlikely to be backported to the 2.4 branch.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1228015&group_id=5470


More information about the Python-bugs-list mailing list