summaryrefslogtreecommitdiffstats
path: root/Lib/email/message.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-02-07 18:04:18 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-02-07 18:04:18 (GMT)
commitfeb68522fd6e1d6ff3e096fdd1b4e57fd1cc09b0 (patch)
tree163abd85c0cd94a0f04cbf62d141ab88e5a877e4 /Lib/email/message.py
parent15a693a6f8f5986c512557747112331ceb5c0b8c (diff)
parentfcc00723808f08c3c917ca73a1e14da43897a6bd (diff)
downloadcpython-feb68522fd6e1d6ff3e096fdd1b4e57fd1cc09b0.zip
cpython-feb68522fd6e1d6ff3e096fdd1b4e57fd1cc09b0.tar.gz
cpython-feb68522fd6e1d6ff3e096fdd1b4e57fd1cc09b0.tar.bz2
Merge: #19063: the unicode-in-set_payload problem isn't getting fixed in 3.4.
Diffstat (limited to 'Lib/email/message.py')
-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 9350615..88b5fa3 100644
--- a/Lib/email/message.py
+++ b/Lib/email/message.py
@@ -303,8 +303,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):
@@ -352,8 +350,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: