Skip to content
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

[3.8] bpo-40597: email: Use CTE if lines are longer than max_line_length consistently (gh-20038) #20084

Merged
merged 1 commit into from
May 18, 2020

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 14, 2020

raw_data_manager (default for EmailPolicy, EmailMessage)
does correct wrapping of 'text' parts as long as the message contains
characters outside of 7bit US-ASCII set: base64 or qp
Content-Transfer-Encoding is applied if the lines would be too long
without it. It did not, however, do this for ascii-only text,
which could result in lines that were longer than
policy.max_line_length or even the rfc 998 maximum.

This changeset fixes the heuristic so that if lines are longer than
policy.max_line_length, it will always apply a
content-transfer-encoding so that the lines are wrapped correctly.
(cherry picked from commit 6f2f475)

Co-authored-by: Arkadiusz Hiler arek.l1@gmail.com

https://bugs.python.org/issue40597

…nsistently (pythongh-20038)

raw_data_manager (default for EmailPolicy, EmailMessage)
does correct wrapping of 'text' parts as long as the message contains
characters outside of 7bit US-ASCII set: base64 or qp
Content-Transfer-Encoding is applied if the lines would be too long
without it.  It did not, however, do this for ascii-only text,
which could result in lines that were longer than
policy.max_line_length or even the rfc 998  maximum.

This changeset fixes the heuristic so that if lines are longer than
policy.max_line_length, it will always apply a
content-transfer-encoding so that the lines are wrapped correctly.
(cherry picked from commit 6f2f475)

Co-authored-by: Arkadiusz Hiler <arek.l1@gmail.com>
@miss-islington
Copy link
Contributor Author

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

2 similar comments
@miss-islington
Copy link
Contributor Author

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

@miss-islington
Copy link
Contributor Author

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

@bitdancer bitdancer merged commit c1f1ddf into python:3.8 May 18, 2020
@miss-islington miss-islington deleted the backport-6f2f475-3.8 branch May 18, 2020 00:57
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