Repository navigation
Conversation
Signed-off-by: wangshun <96341168+xixi-box@users.noreply.github.com>
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
vasiliyk
left a comment
There was a problem hiding this comment.
The PR description mentions a failing test, but the diff does not include one.
Could you add a regression test to Lib/test/test_email/test_contentmanager.py?
There was a problem hiding this comment.
Here we still pass max_line_length uncapped, so bytes content (attachments) is not covered.
Could we apply the cap here as well?
There was a problem hiding this comment.
Thanks for pointing out the attachment path. I've capped base64 wrapping for bytes content at 76 columns, while preserving the policy's zero-length (unlimited) setting. I also added regression tests for text (base64 and quoted-printable) and byte attachments (bytes, bytearray, memoryview) with 60/78/100-column policies, including an unlimited-policy check. The changes are in a2a6447; I couldn't run the full CPython tests locally without a matching build, so CI validation is pending.
Fixes #78206
Verified by running the failing test at
c07d1f4f32ed(fails) and again with this patch applied (passes).