msg207116 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2013-12-30 23:35 |
I missed this. It still defaults to True in Generator. It should default to False in the new policies (but True in compat32). |
|
|
msg207136 - (view) |
Author: Gennadiy Zlobin (gennad) * |
Date: 2014-01-01 16:55 |
I created the patch, please review it. |
|
|
msg207140 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2014-01-01 23:48 |
Sorry, my message wasn't clear. The current default needs to remain the same. What needs to be added is email.policy.Policy.mange_from, which should be True in the compat32 policy and False in EmailPolicy. Then it needs to be hooked up the Generator, so that an explicit specificaion in the __init__ overrides the policy, but specifying one of EmailPolicy dervived policies will override the default value of the __init__ argument if the argument is not speicifed explicitly in the Generator constructor call. (Backward compatibility is a pain.) |
|
|
msg212636 - (view) |
Author: Milan Oberkirch (zvyn) * |
Date: 2014-03-03 13:36 |
(@r.david.murray) I just implemented what you suggested: - Policy has a mangle_from_ property, overridden in EMailPolicy - Generator and DecodedGenerator default to policy.mangle_from_ or True if policy is None. Would be glad if it helps :) |
|
|
msg212641 - (view) |
Author: Milan Oberkirch (zvyn) * |
Date: 2014-03-03 15:01 |
Updates patch to include necessary changes to test_policy.py. |
|
|
msg212992 - (view) |
Author: Milan Oberkirch (zvyn) * |
Date: 2014-03-09 22:27 |
Added documentation for mangle_from. since the name "mangle_from_" is not supported by the markup, changed it to "mangle_from" everywhere, which looks better anyway (I understand why it was the other way so). If it was a bad idea, I can undo it but am unable to do the doc. |
|
|
msg212995 - (view) |
Author: Milan Oberkirch (zvyn) * |
Date: 2014-03-09 22:37 |
Rollback to mangle_from_, sorry for the noise. |
|
|
msg215088 - (view) |
Author: Steve Holden (holdenweb) *  |
Date: 2014-03-28 22:48 |
This is an easy issue? |
|
|
msg217122 - (view) |
Author: Milan Oberkirch (zvyn) * |
Date: 2014-04-24 12:13 |
Updated the last patch according to the review comments at https://bugs.python.org/review/20098/. |
|
|
msg243419 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2015-05-17 18:24 |
New changeset df81f9b67736 by R David Murray in branch 'default': #20098: add mangle_from_ policy option. https://hg.python.org/cpython/rev/df81f9b67736 |
|
|
msg243420 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2015-05-17 18:25 |
Thanks, Milan. |
|
|