Date conversion bug using Python 2.4

Bug #23361 reported by Johan Dahlin
8
Affects Status Importance Assigned to Milestone
mailman (Ubuntu)
Fix Released
High
Tollef Fog Heen

Bug Description

Mailman 2.1.5 has code which depends on the 2.3 behavior:

File "/usr/lib//mailman/Mailman/Bouncer.py", line 131, in registerBounce
    time.strftime('%d-%b-%Y', day + (0,)*6))
ValueError: day of year out of range

time.strftime in python 2.4 is stricter than the one in 2.3,
The 8th (of 9) item of the time tuple cannot be non zero any longer.

Changing it to:

    time.strftime('%d-%b-%Y', day + (0,0,0,0,1,0)))

makes mailman work nicely with Python 2.4 again.
It is already fixed in upstream 2.1.6beta versions.

Revision history for this message
Christian Reis (kiko) wrote :

For reference:

http://mail.python.org/pipermail/mailman-users/2005-March/043640.html

We're seeing this using

ii mailman 2.1.5-7
Powerful, web-based mailing list manager

Tollef, this doesn't appear to be fixed in 2.1.5-8, the Breezy version, either.
It causes the mailman outgoing queue runner to crash every hour for us, which
eventually makes it stop working altogether. The fix is pretty trivial, too.

Revision history for this message
Tollef Fog Heen (tfheen) wrote :

mailman (2.1.5-8ubuntu2) breezy; urgency=low

  * Fix up time.strftime call in bounce handling to conform to how time in
    python 2.4 wants it. Ubuntu #17183

 -- Tollef Fog Heen <email address hidden> Mon, 10 Oct 2005 10:42:34 +0200

Revision history for this message
Colm Buckley (colm) wrote :

This bug also shows up in Confirm.py:

780c780
< date = time.strftime('%A, %B %d, %Y', info.date + (0,) * 6)
---
> date = time.strftime('%A, %B %d, %Y', info.date + (0,0,0,0,1,0))

Needs to be pushed upstream?

Revision history for this message
Johan Dahlin (jdahlin-deactivatedaccount) wrote :

Colm Buckley: "It is already fixed in upstream 2.1.6beta"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.