[Python-checkins] python/dist/src/Misc NEWS,1.337.2.4.2.67,1.337.2.4.2.68

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Thu, 20 Mar 2003 10:31:45 -0800


Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv6172/Misc

Modified Files:
      Tag: release22-maint
	NEWS 
Log Message:
SF bug 705836: struct.pack of floats in non-native endian order

pack_float, pack_double, save_float:  All the routines for creating
IEEE-format packed representations of floats and doubles simply ignored
that rounding can (in rare cases) propagate out of a long string of
1 bits.  At worst, the end-off carry can (by mistake) interfere with
the exponent value, and then unpacking yields a result wrong by a factor
of 2.  In less severe cases, it can end up losing more low-order bits
than intended, or fail to catch overflow *caused* by rounding.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.337.2.4.2.67
retrieving revision 1.337.2.4.2.68
diff -C2 -d -r1.337.2.4.2.67 -r1.337.2.4.2.68
*** NEWS	12 Mar 2003 14:28:21 -0000	1.337.2.4.2.67
--- NEWS	20 Mar 2003 18:30:55 -0000	1.337.2.4.2.68
***************
*** 3,6 ****
--- 3,14 ----
  ============================
  
+ - SF #705836: The platform-independent routines for packing floats in
+   IEEE formats (struct.pack's <f, >f, <d, and >d codes; pickle and
+   cPickle's protocol 1 pickling of floats) ignored that rounding can
+   cause a carry to propagate.  The worst consequence was that, in rare
+   cases, <f and >f could produce strings that, when unpacked again,
+   were a factor of 2 away from the original float.  This has been
+   fixed.
+ 
  - Backported SF patch #676342: after using pdb, the readline command
    completion was botched.
***************
*** 32,36 ****
    2.2.3 and 2.3.  (SF #660455)
  
! - SF bug #678518:  fix some bugs in the parser module.  
  
  - Bastion.py and rexec.py are disabled.  These modules are not safe in
--- 40,44 ----
    2.2.3 and 2.3.  (SF #660455)
  
! - SF bug #678518:  fix some bugs in the parser module.
  
  - Bastion.py and rexec.py are disabled.  These modules are not safe in
***************
*** 104,108 ****
  - SF #570655, fix misleading option text for bdist_rpm
  
! - Distutils: Allow unknown keyword arguments to the setup() function 
    and the Extension constructor, printing a warning about them instead
    of reporting an error and stopping.
--- 112,116 ----
  - SF #570655, fix misleading option text for bdist_rpm
  
! - Distutils: Allow unknown keyword arguments to the setup() function
    and the Extension constructor, printing a warning about them instead
    of reporting an error and stopping.
***************
*** 420,424 ****
  
    - The randint() method is rehabilitated (i.e. no longer deprecated).
!   
  -  In copy.py: when an object is copied through its __reduce__ method,
     there was no check for a __setstate__ method on the result [SF
--- 428,432 ----
  
    - The randint() method is rehabilitated (i.e. no longer deprecated).
! 
  -  In copy.py: when an object is copied through its __reduce__ method,
     there was no check for a __setstate__ method on the result [SF