gh-144156: Fix email header folding concatenating encoded words#144692
gh-144156: Fix email header folding concatenating encoded words#144692robsdedude wants to merge 13 commits intopython:mainfrom
Conversation
|
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 |
|
FYI I've been looking at this and will have a review soonish. You are correct that the gh-92281 fix was buggy. |
bitdancer
left a comment
There was a problem hiding this comment.
Thanks for fixing this!
I edited this review a bunch, so mistake could have crept in to my code suggestions, though I did test them. The randomizer test should catch any transcription errors if nothing else does.
| @@ -0,0 +1,3 @@ | |||
| Fix folding of email headers violating `RFC 2047`_ with two consecutive encoded words without separating linear-white-space. | |||
|
|
|||
| .. _RFC 2047: https://www.rfc-editor.org/rfc/rfc2047 | |||
There was a problem hiding this comment.
| .. _RFC 2047: https://www.rfc-editor.org/rfc/rfc2047 | |
| Fix the folding of headers by the :mod:`email` library when :rfc:`2047` encoded words are used. Now whitespace is correctly preserved and also correctly added between adjacent encoded words. The latter property was broken by the fix for gh-92081, which mostly fixed previous failures to preserve whitespace. |
Out of curiosity I checked, and according to the changelogs the buggy fix was released in 3.14 alpha 1, 3.13 beta 2 and 3.12.5. Unfortunately the latter is now final. Maybe we should include that in the news item? I'm not sure what the policy is on that.
There was a problem hiding this comment.
Maybe we should include that in the news item?
I'm all for documenting known issues and shortcomings. However, I doubt people would find this info in the release notes unless they're doing "software archeology", i.e., they already know (roughly) what info they're looking for.
I'm not sure what the policy is on that.
Neither am I. I'm pretty much a first-time contributor 😅
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Co-authored-by: R. David Murray <rdmurray@bitdance.com>
Misc/NEWS.d/next/Core_and_Builtins/2026-02-10-22-05-51.gh-issue-144156.UbrC7F.rst
Outdated
Show resolved
Hide resolved
Make use of the fact that folder must never produce a line of only WSP.
Uh oh!
There was an error while loading. Please reload this page.