Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
[3.13] gh-135307: Fix email error when policy max_line_length is set to 0 or None (GH-135367)#140917
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…s set to 0 or None (pythonGH-135367)(cherry picked from commit6d45cd8)Co-authored-by: Jiucheng(Oliver) <git.jiucheng@gmail.com>RDM: Like the change made in a earlier PR to the folder, we can/must use 'maxlen' as a stand in for 'unlimited' when computing line lengths when max_line_length is 0 or None; otherwise the computation results in a traceback.
Lib/test/test_email/test_message.py Outdated
| parsed_body=parsed.get_body().get_content().rstrip('\n') | ||
| self.assertEqual(parsed_body,body) | ||
| deftest_invalid_header_names(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
These invalid header name tests are the conflict that caused the automatic back port to fail. You'll need to delete them (they are tests for a change that was not back ported from 3.14 to 3.13). (cherry-picker conflicts can be quite confusing).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I see, thanks. I am going to address that.
10af840 intopython:3.13Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
(cherry picked from commit6d45cd8)
RDM: Like the change made in a earlier PR to the folder, we can/must use 'maxlen' as a stand in for 'unlimited' when computing line lengths when max_line_length is 0 or None; otherwise the computation results in a traceback.
email.policy.Policy.max_line_lengthis falsey #135307