Skip to content

mailbox: improve bytes handling - #9083

Merged
AlexWaygood merged 2 commits into
python:mainfrom
JelleZijlstra:mailbox
Nov 8, 2022
Merged

mailbox: improve bytes handling#9083
AlexWaygood merged 2 commits into
python:mainfrom
JelleZijlstra:mailbox

Conversation

@JelleZijlstra

Copy link
Copy Markdown
Member

- The _MessageData alias refers to objects handled in the
_dump_message method: https://github.com/python/cpython/blob/016c7d37b6acfe2203542a2655080c6402b3be1f/Lib/mailbox.py#L210
- The path passed to __init__ should be a str path because there are
many places in the file (search for self._path) where we join it
with a str, which won't work with a bytes path.
@github-actions

This comment has been minimized.

@AlexWaygoodAlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Comment threadstdlib/mailbox.pyi Outdated
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

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

@AlexWaygood
AlexWaygood merged commit afa2a8e into python:mainNov 8, 2022
Sign up for freeto 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.

2 participants

@JelleZijlstra@AlexWaygood