[issue17171] email.encoders.encode7or8bit does not work with binary data

2013-02-11 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17171 ___ ___

[issue17171] email.encoders.encode7or8bit does not work with binary data

2013-02-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset f83581135ec4 by R David Murray in branch '3.2': #17171: fix email.encoders.encode_7or8bit when applied to binary data. http://hg.python.org/cpython/rev/f83581135ec4 New changeset cabcddbed377 by R David Murray in branch '3.3': Merge: #17171: fix

[issue17171] email.encoders.encode7or8bit does not work with binary data

2013-02-11 Thread R. David Murray
R. David Murray added the comment: Since this was straightforwardly similar to the issue 16564 fix I didn't bother with a review. The 2.7 commit is backporting the behavior-confirming test, just for thoroughness. -- resolution: - fixed stage: needs patch - committed/rejected status:

[issue17171] email.encoders.encode7or8bit does not work with binary data

2013-02-09 Thread R. David Murray
New submission from R. David Murray: Reported by Serhiy in issue 16564: import io, email bytesdata = b'\xfa\xfb\xfc\xfd\xfe\xff' msg = email.mime.application.MIMEApplication(bytesdata, _encoder=encoders.encode_7or8bit) s = io.BytesIO() g = email.generator.BytesGenerator(s)