Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(253403)

#20098: email policy needs a mangle_from setting

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 7 months ago by rdmurray
Modified:
5 years, 3 months ago
Reviewers:
berker.peksag
CC:
barry, holdenweb, r.david.murray, devnull_psf.upfronthosting.co.za, gennad, zvyn
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Patch Set 3 #

Patch Set 4 #

Patch Set 5 #

Patch Set 6 #

Total comments: 7

Patch Set 7 #

Patch Set 8 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/email.policy.rst View 1 2 3 4 5 6 7 1 chunk +12 lines, -0 lines 0 comments Download
Lib/email/generator.py View 1 2 3 4 5 6 7 3 chunks +8 lines, -5 lines 0 comments Download
Lib/email/_policybase.py View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
Lib/email/policy.py View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
Lib/test/test_email/test_generator.py View 1 2 3 4 5 6 7 1 chunk +15 lines, -0 lines 0 comments Download
Lib/test/test_email/test_policy.py View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 2
berkerpeksag
http://bugs.python.org/review/20098/diff/11239/Doc/library/email.policy.rst File Doc/library/email.policy.rst (right): http://bugs.python.org/review/20098/diff/11239/Doc/library/email.policy.rst#newcode191 Doc/library/email.policy.rst:191: .. versionadded:: 3.4 The markup of the doc should ...
5 years, 5 months ago #1
r.david.murray
5 years, 4 months ago #2
In addition to the comments above, the patch also needs to have an additional
test that shows that mangle_from_ can be set True via the policy when a
generator is used.  That test would go in test_email/test_generator.py.

https://bugs.python.org/review/20098/diff/11239/Doc/library/email.policy.rst
File Doc/library/email.policy.rst (right):

https://bugs.python.org/review/20098/diff/11239/Doc/library/email.policy.rst#...
Doc/library/email.policy.rst:191: .. versionadded:: 3.4
On 2014/03/16 10:16:56, berkerpeksag wrote:
> The markup of the doc should be like this:
> 
> .. attribute:: mangle_from_
> 
>    Description of the new parameter.
> 
>    .. versionadded:: 3.5
>       The *mangle_from_* parameter.

Yes this change needs to be made.

https://bugs.python.org/review/20098/diff/11239/Doc/library/email.policy.rst#...
Doc/library/email.policy.rst:191: .. versionadded:: 3.4
On 2014/03/16 10:16:56, berkerpeksag wrote:
> I think it's better to use a versionchanged directive here. It was a private
> parameter in 3.3 and 3.4 and the email.policy module was added in 3.3, but
> people may already use it.
> 
> Also, too late for 3.4, please use 3.5 instead of 3.4 :)

It's a new attribute of policy, which is what maters in this content.

https://bugs.python.org/review/20098/diff/11239/Doc/library/email.policy.rst#...
Doc/library/email.policy.rst:198: Default: :const:`True`.
The text should mention when this parameter is used, which is when the message
is being serialized by a generator.

https://bugs.python.org/review/20098/diff/11239/Lib/email/_policybase.py
File Lib/email/_policybase.py (right):

https://bugs.python.org/review/20098/diff/11239/Lib/email/_policybase.py#newc...
Lib/email/_policybase.py:154: them. Default: True.
As with the doc entry, generator should be mentioned here.

https://bugs.python.org/review/20098/diff/11239/Lib/test/test_email/test_poli...
File Lib/test/test_email/test_policy.py (right):

https://bugs.python.org/review/20098/diff/11239/Lib/test/test_email/test_poli...
Lib/test/test_email/test_policy.py:45: {'mangle_from_': False}),
Having mangle_from here is incorrect.  This test is supposed to test that there
are no differences between the make_defaults base (policy_default in this case)
and the input (policy.default).
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+