cpython/Lib/test/test_email
Robsdedude 0f7cd5544a
gh-144156: Fix email header folding concatenating encoded words (#144692)
The fix for gh-92081 (gh-92281) was unfortunately flawed, and broke whitespace handling for encoded word patterns that had previously been working correctly but had no corresponding tests, unfortunately in a way that made the resulting headers not RFC compliant, in such a way that Yahoo started rejecting the resulting emails.  This fix was released in 3.14 alpha 1, 3.13 beta 2 and 3.12.5.   This PR fixes the original problem in a way that does not break anything, and in fact fixes a small pre-existing bug (a spurious whitespace after the ':' of the header label if the header value is immediately wrapped on to the next line).  (RDM)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: R. David Murray <rdmurray@bitdance.com>
2026-02-19 13:29:05 -05:00
..
data gh-139434: Update selected RFC 2822 references to RFC 5322 (#139435) 2025-11-04 14:46:07 -05:00
__init__.py
__main__.py
test__encoded_words.py
test__header_value_parser.py gh-143935: Email preserve parens when folding comments (#143936) 2026-01-19 12:38:22 +00:00
test_asian_codecs.py gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00
test_contentmanager.py gh-71339: Use new assertion methods in the email tests (GH-129055) 2025-04-14 09:25:58 +03:00
test_defect_handling.py gh-68552: fix defects policy (#138579) 2025-12-06 16:54:29 -05:00
test_email.py gh-68552: fix defects policy (#138579) 2025-12-06 16:54:29 -05:00
test_generator.py gh-144156: Fix email header folding concatenating encoded words (#144692) 2026-02-19 13:29:05 -05:00
test_headerregistry.py gh-144156: Fix email header folding concatenating encoded words (#144692) 2026-02-19 13:29:05 -05:00
test_inversion.py
test_message.py gh-135307: Fix email error when policy max_line_length is set to 0 or None (#135367) 2025-11-02 09:32:14 -05:00
test_parser.py
test_pickleable.py
test_policy.py gh-144156: Fix email header folding concatenating encoded words (#144692) 2026-02-19 13:29:05 -05:00
test_utils.py gh-118761: Add test_lazy_import for more modules (#133057) 2025-05-05 22:46:05 +00:00
torture_test.py gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00