[Python-checkins] cpython (3.3): #19063: the unicode-in-set_payload problem isn't getting fixed in 3.4.
r.david.murray
python-checkins at python.org
Fri Feb 7 19:06:36 CET 2014
http://hg.python.org/cpython/rev/4daf3cec9419
changeset: 89017:4daf3cec9419
branch: 3.3
parent: 89008:e5a78f7c2dcb
user: R David Murray <rdmurray at bitdance.com>
date: Fri Feb 07 13:03:08 2014 -0500
summary:
#19063: the unicode-in-set_payload problem isn't getting fixed in 3.4.
files:
Lib/email/message.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/Lib/email/message.py b/Lib/email/message.py
--- a/Lib/email/message.py
+++ b/Lib/email/message.py
@@ -277,8 +277,6 @@
"""
if hasattr(payload, 'encode'):
if charset is None:
- # We should check for ASCII-only here, but we can't do that
- # for backward compatibility reasons. Fixed in 3.4.
self._payload = payload
return
if not isinstance(charset, Charset):
@@ -326,8 +324,9 @@
try:
cte(self)
except TypeError:
- # This if is for backward compatibility and will be removed
- # in 3.4 when the ascii check is added to set_payload.
+ # This 'if' is for backward compatibility, it allows unicode
+ # through even though that won't work correctly if the
+ # message is serialized.
payload = self._payload
if payload:
try:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list