[issue29478] email.policy.Compat32(max_line_length=None) not as documented

2017-03-10 Thread Mircea Cosbuc

Mircea Cosbuc added the comment:

Just to be sure, I performed the same operations with my changes in place, 
there's no change in behaviour. I think it's expected since I only modified how 
the Compat32 policy passes `max_line_length` to the header class.

--

___
Python tracker 
<http://bugs.python.org/issue29478>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29478] email.policy.Compat32(max_line_length=None) not as documented

2017-03-10 Thread Mircea Cosbuc

Mircea Cosbuc added the comment:

Thanks for the prompt feedback. In Python 3.2, the closest equivalent for the 
illustrated issue I could find is:

>>> from email.message import Message
>>> from email.generator import Generator
>>> from sys import stdout
>>> m = Message()
>>> m["Field"] = "x" * 100
>>> g0 = Generator(stdout, maxheaderlen=0)
>>> gn = Generator(stdout, maxheaderlen=None)

>>> g0.flatten(m)
Field: 


>>> gn.flatten(m)
Field: 
 



It may be the case that a documentation change is all that is needed. I'm not 
sure that this change would break compatibility since `max_line_length=None` 
for the policy is not the default value. Please advise further if I should just 
update the documentation and modify the test to guard for future changes.

--
nosy: +mcosbuc

___
Python tracker 
<http://bugs.python.org/issue29478>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29478] email.policy.Compat32(max_line_length=None) not as documented

2017-03-10 Thread Mircea Cosbuc

Changes by Mircea Cosbuc :


--
pull_requests: +491

___
Python tracker 
<http://bugs.python.org/issue29478>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com