[Python-checkins] python/dist/src/Lib rfc822.py,1.76,1.77

bwarsaw at users.sourceforge.net bwarsaw at users.sourceforge.net
Sat Aug 7 18:38:51 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16756/Lib

Modified Files:
	rfc822.py 
Log Message:
Resolution of bug #997368, "strftime() backward compatibility".

Specifically, time.strftime() no longer accepts a 0 in the yday position of a
time tuple, since that can crash some platform strftime() implementations.

parsedate_tz(): Change the return value to return 1 in the yday position.

Update tests in test_rfc822.py and test_email.py


Index: rfc822.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/rfc822.py,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -d -r1.76 -r1.77
*** rfc822.py	11 Nov 2003 19:39:17 -0000	1.76
--- rfc822.py	7 Aug 2004 16:38:38 -0000	1.77
***************
*** 928,932 ****
              tzsign = 1
          tzoffset = tzsign * ( (tzoffset//100)*3600 + (tzoffset % 100)*60)
!     tuple = (yy, mm, dd, thh, tmm, tss, 0, 0, 0, tzoffset)
      return tuple
  
--- 928,932 ----
              tzsign = 1
          tzoffset = tzsign * ( (tzoffset//100)*3600 + (tzoffset % 100)*60)
!     tuple = (yy, mm, dd, thh, tmm, tss, 0, 1, 0, tzoffset)
      return tuple
  



More information about the Python-checkins mailing list