[ python-Bugs-996359 ] Bug somewhere in email Parser or
PortableUnixMailbox
SourceForge.net
noreply at sourceforge.net
Fri Jul 23 16:22:28 CEST 2004
Bugs item #996359, was opened at 2004-07-23 00:53
Message generated for change (Comment added) made by montanaro
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=996359&group_id=5470
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
>Assigned to: A.M. Kuchling (akuchling)
Summary: Bug somewhere in email Parser or PortableUnixMailbox
Initial Comment:
When run under Python 2.3 and fed a unix mbox file
on stdin, this script prints the lengths of the messages
in the file and their subjects on stdout:
import sys
import mailbox
import email.Parser
for msg in mailbox.PortableUnixMailbox(sys.stdin,
email.Parser.Parser().parse):
print len(str(msg)), msg["subject"]
If run using Python from CVS it prints out "38" as the
length of each message and "None" as the subject.
Something clearly changed between 2.3 and 2.4.
I've not had a chance to dig into the problem yet.
Am I using PortableUnixMailbox or email.Parser.Parser
in some unsupported and now broken way?
Assigning to Barry since he's the obvious email guru,
but anyone can feel free to jump in here. This would
seem to be a fairly serious bug.
Skip
----------------------------------------------------------------------
>Comment By: Skip Montanaro (montanaro)
Date: 2004-07-23 09:22
Message:
Logged In: YES
user_id=44345
Further investigation shows this simpler script demonstrates
the problem:
import sys
import mailbox
for msg in mailbox.PortableUnixMailbox(sys.stdin):
print len(str(msg))
Looking at mailbox.py it appears v 1.42 is the culprit.
Reverting to 1.41
solves the problem. Reassigning to Andrew since he checked
in that
version.
Skip
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=996359&group_id=5470
More information about the Python-bugs-list
mailing list