Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 19, 2020

Conversation

miss-islington
Copy link
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 [email protected]

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 <[email protected]>
@miss-islington
Copy link
Contributor Author

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

@miss-islington
Copy link
Contributor Author

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

@miss-islington miss-islington merged commit 371146a into python:3.8 Oct 19, 2020
@miss-islington miss-islington deleted the backport-bf83822-3.8 branch October 19, 2020 23:07
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