FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-120946: Add MIME-Version when making EmailMessage multipart by limadog9 · Pull Request #159852 · python/cpython · GitHub

Repository navigation

gh-120946: Add MIME-Version when making EmailMessage multipart - #159852

Open
limadog9 wants to merge 1 commit into
python:mainfrom
limadog9:gh-120946-email-multipart-version
Open

limadog9 wants to merge 1 commit into
python:mainfrom
limadog9:gh-120946-email-multipart-version

Conversation

limadog9 commented Oct 20, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Multipart messages created with EmailMessage.make_related() or add_related() can omit the required MIME-Version header. Add the header when an EmailMessage is converted to any multipart subtype, preserving an existing header.

Add regressions for all three multipart constructors, the related-image case, existing headers, and the distinction from MIMEPart. Update existing header-count expectations for the added header.

Fixes #120946.

Validation:

  • The new regressions reproduce four failures before the fix.
  • Full email suite on a CPython debug build: 1,825 tests, 2 skipped.
  • Ruff, NEWS lint, and patchcheck.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

multipart/related mail generated with EmailMessage() class lacks mandatory MIME-Version header

1 participant


Back | FazBrowse Home | New Git URL