classification
Title: Charset instance not passed to set_payload()
Type: behavior Stage: resolved
Components: email Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: barry, berker.peksag, claudep, python-dev, r.david.murray
Priority: normal Keywords: patch

Created on 2016-07-02 21:13 by claudep, last changed 2016-09-08 16:59 by claudep. This issue is now closed.

Files
File name Uploaded Description Edit
issue27445.diff claudep, 2016-07-02 21:25 review
Messages (4)
msg269740 - (view) Author: Claude Paroz (claudep) Date: 2016-07-02 21:13
In issue #16324, I contributed an improvement so as MIMEText __init__ accept Charset instances, not only encoding strings. The use case is from Django where we customize the Charset.body_encoding before passing it to the MIMEText initialization.

Unfortunately, what I didn't notice when Berker adapted my patch is that the Charset is casted to its string representation for the whole method, while I initially intended to let the unchanged Charset passed to self.set_payload. And the test I suggested was not smart enough to detect that.
msg275061 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-08 16:41
New changeset 4f6fef83cd0c by Berker Peksag in branch '3.5':
Issue #27445: Don't pass str(_charset) to MIMEText.set_payload()
https://hg.python.org/cpython/rev/4f6fef83cd0c

New changeset c5cb8bd335ae by Berker Peksag in branch 'default':
Issue #27445: Merge from 3.5
https://hg.python.org/cpython/rev/c5cb8bd335ae
msg275062 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-09-08 16:43
Thanks for the patch, Claude.
msg275066 - (view) Author: Claude Paroz (claudep) Date: 2016-09-08 16:59
Thanks for pushing the patch!
History
Date User Action Args
2016-09-08 16:59:30claudepsetmessages: + msg275066
2016-09-08 16:43:04berker.peksagsetstatus: open -> closed
resolution: fixed
messages: + msg275062

stage: patch review -> resolved
2016-09-08 16:41:58python-devsetnosy: + python-dev
messages: + msg275061
2016-09-07 14:02:20berker.peksagsetnosy: + berker.peksag
stage: patch review
type: behavior

versions: + Python 3.5
2016-07-02 21:25:05claudepsetfiles: + issue27445.diff
keywords: + patch
2016-07-02 21:13:07claudepcreate