Skip to content

Propagate EmailMessage generics#15639

Open
tamird wants to merge 2 commits intopython:mainfrom
tamird:email-message-generic
Open

Propagate EmailMessage generics#15639
tamird wants to merge 2 commits intopython:mainfrom
tamird:email-message-generic

Conversation

@tamird
Copy link
Copy Markdown
Contributor

@tamird tamird commented Apr 10, 2026

Commit 56db30e made Message generic,
but left EmailMessage inheriting from bare MIMEPart.

Propagate the same type parameters to EmailMessage so it is typed
consistently, and add a regression test case covering the generic
EmailMessage behavior.

Commit 56db30e made Message generic,
but left EmailMessage inheriting from bare MIMEPart.

Propagate the same type parameters to EmailMessage so it is typed
consistently, and add a regression test case covering the generic
EmailMessage behavior.
@github-actions

This comment has been minimized.

Commit 56db30e made Message generic and
switched get_body() and iter_parts() to return
MIMEPart[_HeaderRegistryT].

That dropped the second type parameter, so the header parameter type
defaulted to Any. Preserve both type parameters in the return types and
add a regression test covering get_body() and iter_parts().
@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant