summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2020-10-19 22:49:19 (GMT)
committerGitHub <noreply@github.com>2020-10-19 22:49:19 (GMT)
commitbf838227c35212709dc43b3c3c57f8e1655c1d24 (patch)
tree31a22425e9887d5a9451f4a5f49299fdd1b2ef13 /Misc
parent1438c2ac773e87d1f9c97fc22f2346e16bf48773 (diff)
downloadcpython-bf838227c35212709dc43b3c3c57f8e1655c1d24.zip
cpython-bf838227c35212709dc43b3c3c57f8e1655c1d24.tar.gz
cpython-bf838227c35212709dc43b3c3c57f8e1655c1d24.tar.bz2
bpo-27321 Fix email.generator.py to not replace a non-existent header. (GH-18074)
This PR replaces #1977. The reason for the replacement is two-fold. The fix itself is different is that if the CTE header doesn't exist in the original message, it is inserted. This is important because the new CTE could be quoted-printable whereas the original is implicit 8bit. Also the tests are different. The test_nonascii_as_string_without_cte test in #1977 doesn't actually test the issue in that it passes without the fix. The test_nonascii_as_string_without_content_type_and_cte test is improved here, and even though it doesn't fail without the fix, it is included for completeness. Automerge-Triggered-By: @warsaw
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2020-01-19-18-40-26.bpo-27321.8e6SpM.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2020-01-19-18-40-26.bpo-27321.8e6SpM.rst b/Misc/NEWS.d/next/Library/2020-01-19-18-40-26.bpo-27321.8e6SpM.rst
new file mode 100644
index 0000000..28acf7f
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2020-01-19-18-40-26.bpo-27321.8e6SpM.rst
@@ -0,0 +1,2 @@
+Fixed KeyError exception when flattening an email to a string attempts to
+replace a non-existent Content-Transfer-Encoding header.