bpo-43125: Fix: return expected type (str), not original value (bytes) in email/base64mime.py::body_encode#24476
Conversation
|
my first PR ! :) what's next ? |
corona10
left a comment
There was a problem hiding this comment.
lgtm
but @serhiy-storchaka Can you please take a look also?
Misc/NEWS.d/next/Library/2021-02-07-19-13-30.bpo-43125.AqNoMa.rst
Outdated
Show resolved
Hide resolved
|
I made the changes. what's next step ? |
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
I have made the requested changes; please review again |
|
Thanks for making the requested changes! @matrixise, @corona10: please review the changes made to this pull request. |
All in title.
the utility function
Lib/email/base64mime.py::body_encode:returns its given input if this one evaluates to False. This is bad. given the expected input is bytes but the expected output is str. (
return EMPTYSTRING.join(encvec)).The fix looks obvious: return an empty string instead of the original object (whatever type it might be).
https://bugs.python.org/issue43125