[Patches] [ python-Patches-1449244 ] email.message.py charset can be unicode instance
SourceForge.net
noreply at sourceforge.net
Tue Mar 13 11:24:56 CET 2007
Patches item #1449244, was opened at 2006-03-14 00:55
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1449244&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 2.5
>Status: Closed
>Resolution: Accepted
Priority: 7
Private: No
Submitted By: Tokio Kikuchi (tkikuchi)
Assigned to: Barry A. Warsaw (bwarsaw)
Summary: email.message.py charset can be unicode instance
Initial Comment:
*_charset in Charset become unicode instance in
email-4.0a. message.py should add this for type test.
--- email-4.0a2/email/message.py Mon Mar 6 04:58:33 2006
+++ email/message.py Mon Mar 6 14:59:04 2006
@@ -238,7 +238,7 @@
self.del_param('charset')
self._charset = None
return
- if isinstance(charset, str):
+ if isinstance(charset, str) or
isinstance(charset, unicode):
charset = email.charset.Charset(charset)
if not isinstance(charset, email.charset.Charset):
raise TypeError(charset)
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2007-03-13 11:24
Message:
Logged In: YES
user_id=21627
Originator: NO
Thanks for the patch. Committed as r54333 and r54334.
----------------------------------------------------------------------
Comment By: Tokio Kikuchi (tkikuchi)
Date: 2007-03-06 21:12
Message:
Logged In: YES
user_id=67709
Originator: YES
Here is a revised patch with a test case. I've found another unicode
charset bug in the code and it was fixed also.
File Added: email.1449244.patch
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2007-03-05 14:17
Message:
Logged In: YES
user_id=21627
Originator: NO
Can you please include a test case for this, as a patch to the current
test suite, using the unittest framework?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1449244&group_id=5470
More information about the Patches
mailing list