[Patches] [ python-Patches-1757839 ] struni: make test_mailbox and test_old_mailbox pass

SourceForge.net noreply at sourceforge.net
Sat Jul 21 00:49:13 CEST 2007


Patches item #1757839, was opened at 2007-07-20 18:45
Message generated for change (Comment added) made by avassalotti
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1757839&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: Library (Lib)
Group: Python 3000
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Alexandre Vassalotti (avassalotti)
Assigned to: Nobody/Anonymous (nobody)
Summary: struni: make test_mailbox and test_old_mailbox pass

Initial Comment:
This patch make reads to a file return a string of the str type. This required to change the mode of certain call to open() to non-binary. I have no idea if this will cause problem, but at least the tests pass. If someone wants to keep opening these file in binary mode, then he will have to create a "proxy" class, like _ProxyFile in mailbox.py but with writing support, since file opened in binary mode always return string of the bytes type. Another solution would be to wrap every read() and readline() calls, on these files, with str().

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

>Comment By: Alexandre Vassalotti (avassalotti)
Date: 2007-07-20 18:49

Message:
Logged In: YES 
user_id=1826340
Originator: YES

Here another patch that makes the failure message a little more
descriptive.

To apply both:

   cat 01_fix_mailbox.patch 02_better_failure_msg.patch | patch -p0

File Added: 02_better_failure_msg.patch

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

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


More information about the Patches mailing list