Skip to content

Conversation

@suutari
Copy link
Contributor

@suutari suutari commented Nov 24, 2019

Fix type of the message argument in couple methods and make the stub-only helpers private by prefixing them with underscore.

These HasIteritems and HasItems protocols don't exist in the real
mailbox module so prefix them with underscore to indicate they are
private.
The Mailbox.add and Mailbox.__setitem__ methods take a message argument
which can be anything that is convertible to a Message.  Fix the
signatures accordingly.
@JelleZijlstra
Copy link
Member

cc @CraftSpider who contributed the stubs.

@CraftSpider
Copy link
Contributor

CraftSpider commented Nov 25, 2019

Double checked the source/docs, and looks good to me. _MessageType is bound to be a more specific sub-type of email.message.Message, I over-constrained the possible inputs (internally, add and __setitem__ call a non-stubbed private method that accepts _MessageData)

@JelleZijlstra JelleZijlstra merged commit 90004af into python:master Nov 25, 2019
@JelleZijlstra
Copy link
Member

Thanks for the PR and review!

@suutari
Copy link
Contributor Author

suutari commented Nov 25, 2019

Thanks for reviewing and merging this so quickly!

It occurred to me while reading the review that there's still one more place that should be fixed accordingly, the update method. See PR #3493.

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.

3 participants