This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xtreak
Recipients barry, r.david.murray, silane, xtreak
Date 2018-09-25.18:14:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1537899258.85.0.545547206417.issue34800@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks silane for the report and script. The case where max_line_length=0 causing ValueError was introduced with b938c8c25316b69f1d5df2c7880a9f6b87e7c2fa and the code at [0] has some comments regarding the minimum value to be 4 characters. There was another case where policy can have max_line_length=0 but it's with respect to folding issue33524. Maybe this behavior can be documented better for set_content method with respect to the minimum value ? 

[0] https://github.com/tirkarthi/cpython/blob/f6c8007a29b95b3ea3ca687a9b4924769a696328/Lib/email/quoprimime.py#L171


"""
    Each line will be wrapped at, at most, maxlinelen characters before the
    eol string (maxlinelen defaults to 76 characters, the maximum value
    permitted by RFC 2045).  Long lines will have the 'soft line break'
    quoted-printable character "=" appended to them, so the decoded text will
    be identical to the original text.

    The minimum maxlinelen is 4 to have room for a quoted character ("=XX")
    followed by a soft line break.  Smaller values will generate a
    ValueError.
"""

Hope this helps!
History
Date User Action Args
2018-09-25 18:14:18xtreaksetrecipients: + xtreak, barry, r.david.murray, silane
2018-09-25 18:14:18xtreaksetmessageid: <1537899258.85.0.545547206417.issue34800@psf.upfronthosting.co.za>
2018-09-25 18:14:18xtreaklinkissue34800 messages
2018-09-25 18:14:18xtreakcreate