cpython/Lib/test/test_email
Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) c432d0147b
gh-127794: Validate email header names according to RFC 5322 (#127820)
`email.message.Message` objects now validate header names specified via `__setitem__`
or `add_header` according to RFC 5322, §2.2 [1].

In particular, callers should expect a ValueError to be raised for invalid header names.

[1]: https://datatracker.ietf.org/doc/html/rfc5322#section-2.2

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: R. David Murray <rdmurray@bitdance.com>
2025-03-30 12:29:29 +00:00
..
data gh-106186: Don't report MultipartInvariantViolationDefect for valid multipart emails when parsing header only (#107016) 2023-07-23 12:25:18 +02:00
__init__.py
__main__.py
test__encoded_words.py
test__header_value_parser.py gh-121284: Fix email address header folding with parsed encoded-word (GH-122754) 2025-03-18 12:07:17 +01: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
test_defect_handling.py
test_email.py gh-127794: Validate email header names according to RFC 5322 (#127820) 2025-03-30 12:29:29 +00:00
test_generator.py gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) 2024-07-31 00:19:48 +02:00
test_headerregistry.py gh-98188: Fix EmailMessage.get_payload to decode data when CTE value has extra text (#127547) 2025-01-05 20:32:16 -05:00
test_inversion.py
test_message.py gh-127794: Validate email header names according to RFC 5322 (#127820) 2025-03-30 12:29:29 +00:00
test_parser.py
test_pickleable.py
test_policy.py gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) 2024-07-31 00:19:48 +02:00
test_utils.py gh-120417: Remove unused imports in tests (part 2) (#120630) 2024-06-17 21:05:37 +02: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