Skip to content

[3.9] bpo-27321 Fix email.generator.py to not replace a non-existent header. (GH-18074)#22796

Merged
miss-islington merged 1 commit intopython:3.9from
miss-islington:backport-bf83822-3.9
Oct 19, 2020
Merged

[3.9] bpo-27321 Fix email.generator.py to not replace a non-existent header. (GH-18074)#22796
miss-islington merged 1 commit intopython:3.9from
miss-islington:backport-bf83822-3.9

Conversation

@miss-islington
Copy link
Copy Markdown
Contributor

@miss-islington miss-islington commented Oct 19, 2020

This PR replaces GH-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 GH-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
(cherry picked from commit bf83822)

Co-authored-by: Mark Sapiro mark@msapiro.net

https://bugs.python.org/issue27321

Automerge-Triggered-By: @warsaw

pythonGH-18074)

This PR replaces pythonGH-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 pythonGH-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
(cherry picked from commit bf83822)

Co-authored-by: Mark Sapiro <mark@msapiro.net>
@miss-islington
Copy link
Copy Markdown
Contributor Author

@msapiro: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 72ce82a into python:3.9 Oct 19, 2020
@miss-islington miss-islington deleted the backport-bf83822-3.9 branch October 19, 2020 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants