Title: email: ContentManager.set_content calls nonexistent method encode() on bytes
Type: Stage: patch review
Components: email Versions: Python 3.10, Python 3.9, Python 3.8
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: barry, joreiff, python-dev, r.david.murray
Priority: normal Keywords: patch

Created on 2020-07-26 17:59 by joreiff, last changed 2021-02-07 18:06 by joreiff.

Pull Requests
URL Status Linked Edit
PR 21631 open python-dev, 2020-07-26 18:12
Messages (5)
msg374337 - (view) Author: Johannes Reiff (joreiff) * Date: 2020-07-26 17:59
If assigning binary content to an EmailMessage via set_content(), the function email.contentmanager.set_bytes_content() is called. This function fails when choosing the 7bit transfer encoding because of a call to data.decode('ascii').
msg374641 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2020-07-31 13:17
The fix looks good to me.  Don't know how I made that mistake, and obviously I didn't write a test for it...
msg374667 - (view) Author: Johannes Reiff (joreiff) * Date: 2020-08-01 19:39
Thanks! Is there anything I need to do regarding the Python 3.8 and 3.9 backports?
msg376109 - (view) Author: Johannes Reiff (joreiff) * Date: 2020-08-30 15:00
It has been almost a month since the last update, so pinging as suggested in the Developer's Guide. Do I need to do something before the PR can be merged?
msg386596 - (view) Author: Johannes Reiff (joreiff) * Date: 2021-02-07 18:06
Could someone comment on the way forward? Or ideally just merge my PR (it was approved on GitHub)? I am still very much interested in this bug getting fixed.
Date User Action Args
2021-02-07 18:06:52joreiffsetmessages: + msg386596
2020-08-30 15:00:39joreiffsetmessages: + msg376109
2020-08-01 19:39:43joreiffsetmessages: + msg374667
2020-07-31 13:17:59r.david.murraysetmessages: + msg374641
2020-07-26 18:12:12python-devsetkeywords: + patch
nosy: + python-dev

pull_requests: + pull_request20772
stage: patch review
2020-07-26 17:59:16joreiffcreate