[issue14645] Generator does not translate linesep characters in certain circumstances

2014-10-02 Thread R. David Murray
R. David Murray added the comment: Well, that may not be exactly the same issue, but I suspect it is related. -- ___ Python tracker ___ __

[issue14645] Generator does not translate linesep characters in certain circumstances

2014-10-02 Thread R. David Murray
R. David Murray added the comment: There already is one: issue 19003. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue14645] Generator does not translate linesep characters in certain circumstances

2014-10-02 Thread Yu Zhao
Yu Zhao added the comment: Ack (Per rfc2046 4.1.1). Since the _writeBody is set to _handle_text when no proper handler exists, the problem should be fixed by adding a binary body handler to BytesGenerator. Will create a separate issue to track the problem. -- _

[issue14645] Generator does not translate linesep characters in certain circumstances

2014-10-02 Thread R. David Murray
R. David Murray added the comment: The payload must also use \r\n per RFC, unless it is a non-text part, in which case it uses \r\n to separate the content transfer encoded lines. If you want binary integrity you must use a binary MIME type. -- ___

[issue14645] Generator does not translate linesep characters in certain circumstances

2014-10-02 Thread Yu Zhao
Yu Zhao added the comment: This at least shouldn't be done for the BytesGenerator - it breaks binary data integrity. IMO, doing it for the string Generator is not necessary either. The linesep is a policy regarding to MIME syntax. It shouldn't be applied to the payload. Imagine what would happ

[issue14645] Generator does not translate linesep characters in certain circumstances

2013-03-07 Thread R. David Murray
R. David Murray added the comment: I'm not going to fix this in Python2. While the problem exists there, it hasn't ever been reported as a bug. As noted earlier, this is probably primarily due to the fact that it would be very exceptional to read an email in python2 with anything other than

[issue14645] Generator does not translate linesep characters in certain circumstances

2013-03-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 30c0f0dd0b94 by R David Murray in branch '3.2': #14645: Generator now emits correct linesep for all parts. http://hg.python.org/cpython/rev/30c0f0dd0b94 New changeset 1b9dc00c4d57 by R David Murray in branch '3.3': Merge: #14645: Generator now emits

[issue14645] Generator does not translate linesep characters in certain circumstances

2013-03-03 Thread R. David Murray
R. David Murray added the comment: Here's a patch, against 3.2. It definitely does affect smtplib.send_message. -- keywords: +patch priority: normal -> high stage: needs patch -> patch review Added file: http://bugs.python.org/file29300/generator_lineneds.patch

[issue14645] Generator does not translate linesep characters in certain circumstances

2012-05-24 Thread R. David Murray
Changes by R. David Murray : -- assignee: r.david.murray -> components: +email nosy: +barry ___ Python tracker ___ ___ Python-bugs-li

[issue14645] Generator does not translate linesep characters in certain circumstances

2012-04-22 Thread R. David Murray
New submission from R. David Murray : I ran into this while translating a test, but it turns out it is a long standing problem. I presume it has not been an issue because in general in Python2 email messages are read as text with universal newline support, and thus the linesep characters get