-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
email policy needs a mangle_from setting #64297
Comments
I missed this. It still defaults to True in Generator. It should default to False in the new policies (but True in compat32). |
I created the patch, please review it. |
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.) |
(@r.david.murray) I just implemented what you suggested:
Would be glad if it helps :) |
Updates patch to include necessary changes to test_policy.py. |
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. |
Rollback to mangle_from_, sorry for the noise. |
This is an easy issue? |
Updated the last patch according to the review comments at https://bugs.python.org/review/20098/. |
New changeset df81f9b67736 by R David Murray in branch 'default': |
Thanks, Milan. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: