Changes by R. David Murray rdmur...@bitdance.com:
--
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17171
___
___
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
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:
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)