summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-02-07 18:03:08 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-02-07 18:03:08 (GMT)
commitfcc00723808f08c3c917ca73a1e14da43897a6bd (patch)
tree96114b66187b128c2a9276edf5ded7288034406c /Lib/email
parent5cfc79deaeabf4af3c767665098a37da9f375eda (diff)
downloadcpython-fcc00723808f08c3c917ca73a1e14da43897a6bd.zip
cpython-fcc00723808f08c3c917ca73a1e14da43897a6bd.tar.gz
cpython-fcc00723808f08c3c917ca73a1e14da43897a6bd.tar.bz2
#19063: the unicode-in-set_payload problem isn't getting fixed in 3.4.
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/message.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/email/message.py b/Lib/email/message.py
index 63b51f6..afe350c 100644
--- a/Lib/email/message.py
+++ b/Lib/email/message.py
@@ -277,8 +277,6 @@ class Message:
"""
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 @@ class Message:
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: