summaryrefslogtreecommitdiffstats
path: root/Doc/library/email.message.rst
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-12-11 21:52:11 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-12-11 21:52:11 (GMT)
commit50bfbb9903171c96c19359fd50fb6a5570128ef6 (patch)
treee275522a82b7244c17ffa19ef23e52d688ac6bc8 /Doc/library/email.message.rst
parent34bd9fc59a36f9803777f0446bc461083bdec78e (diff)
downloadcpython-50bfbb9903171c96c19359fd50fb6a5570128ef6.zip
cpython-50bfbb9903171c96c19359fd50fb6a5570128ef6.tar.gz
cpython-50bfbb9903171c96c19359fd50fb6a5570128ef6.tar.bz2
#19063: fix set_payload handling of non-ASCII string input.
This version of the fix raises an error instead of accepting the invalid input (ie: if a non-ASCII string is used but no charset is specified).
Diffstat (limited to 'Doc/library/email.message.rst')
-rw-r--r--Doc/library/email.message.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/library/email.message.rst b/Doc/library/email.message.rst
index 84a5f51..1769585 100644
--- a/Doc/library/email.message.rst
+++ b/Doc/library/email.message.rst
@@ -196,7 +196,13 @@ Here are the methods of the :class:`Message` class:
Set the entire message object's payload to *payload*. It is the client's
responsibility to ensure the payload invariants. Optional *charset* sets
- the message's default character set; see :meth:`set_charset` for details.
+ the message's character set; see :meth:`set_charset` for details. If
+ *payload* is a string containing non-ASCII characters, *charset* is
+ required.
+
+ .. versionchanged:: 3.4
+ Previous to 3.4 *charset* was not required when *payload* was a
+ non-ASCII string, but omitting it produced nonsense results.
.. method:: set_charset(charset)