Issue 27445: Charset instance not passed to set_payload() (original) (raw)

Issue27445

Created on 2016-07-02 21:13 by claudep, last changed 2022-04-11 14:58 by admin. 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
2022-04-11 14:58:33 admin set github: 71632
2016-09-08 16:59:30 claudep set messages: +
2016-09-08 16:43:04 berker.peksag set status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved
2016-09-08 16:41:58 python-dev set nosy: + python-devmessages: +
2016-09-07 14:02:20 berker.peksag set nosy: + berker.peksagstage: patch reviewtype: behaviorversions: + Python 3.5
2016-07-02 21:25:05 claudep set files: + issue27445.diffkeywords: + patch
2016-07-02 21:13:07 claudep create