Issue 27331: Add a policy argument to email.mime.MIMEBase (original) (raw)

Issue27331

Created on 2016-06-16 10:40 by berker.peksag, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
mimebase_policy.diff berker.peksag,2016-06-16 10:40 review
Messages (5)
msg268653 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-06-16 10:40
Quoting Barry's message from issue 10839: On Jun 13, 2016, at 06:38 AM, Berker Peksag wrote: >I don't know if it's a good idea or API but can we add a 'policy' keyword >argument to email.mime.base.MIMEBase? Right now, this is the only way to >change the default policy without using high level functions like >email.message_from_string(): > > m = MIMEMultipart() > m.policy = email.policy.default I think we just need to plumb a `policy` argument through to the ultimate base class, email.message.Message
msg274880 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-09-07 20:29
I'm going to commit this, but leave the issue open for someone to provide tests.
msg274882 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-09-07 20:46
Sorry, I must have mispaged or something and missed the tests on the first readthrough.
msg274883 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-07 20:48
New changeset 481d14cb7595 by R David Murray in branch 'default': #27331: add policy keyword argument to all MIME subclasses. https://hg.python.org/cpython/rev/481d14cb7595
msg274886 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-09-07 20:50
Thanks, Berker.
History
Date User Action Args
2022-04-11 14:58:32 admin set github: 71518
2016-09-07 20:50:47 r.david.murray set status: open -> closedresolution: fixedmessages: + stage: test needed -> resolved
2016-09-07 20:48:59 python-dev set nosy: + python-devmessages: +
2016-09-07 20:46:18 r.david.murray set messages: +
2016-09-07 20:29:37 r.david.murray set messages: + stage: patch review -> test needed
2016-06-16 10:40:47 berker.peksag create