]> granicus.if.org Git - python/commitdiff
#19063: the unicode-in-set_payload problem isn't getting fixed in 3.4.
authorR David Murray <rdmurray@bitdance.com>
Fri, 7 Feb 2014 18:03:08 +0000 (13:03 -0500)
committerR David Murray <rdmurray@bitdance.com>
Fri, 7 Feb 2014 18:03:08 +0000 (13:03 -0500)
Lib/email/message.py

index 63b51f6007d16478cf3be51f9573544319bb28d0..afe350c902c8d74bfda191038bd3e8aa84460b70 100644 (file)
@@ -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: