[issue11156] email.encoders.encode_base64 create a single long line

2011-02-09 Thread R. David Murray
Changes by R. David Murray : -- superseder: -> binary email attachment issue with base64 encoding ___ Python tracker ___ ___ Python-b

[issue11156] email.encoders.encode_base64 create a single long line

2011-02-09 Thread R. David Murray
R. David Murray added the comment: This appears to be a duplicate of issue 9298. Yves, if you disagree let me know what's different. -- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed type: -> behavior versions: +Python 3.2, Python

[issue11156] email.encoders.encode_base64 create a single long line

2011-02-09 Thread Yves Dorfsman
Yves Dorfsman added the comment: In case this does not get fixed for a long time, here is a work around (re-implement the encoder yourself): . . . def myencoder(msg): from base64 import encodebytes as _bencode orig = msg.get_payload() encdata = str(_bencode(orig), 'ascii') msg.set_pa

[issue11156] email.encoders.encode_base64 create a single long line

2011-02-08 Thread Yves Dorfsman
New submission from Yves Dorfsman : email.encoders.encode_base64 returns a str of a single long line instead of breaking it up into 76 chars line as per RFC 2045, and as implemented by email.base64mime. Solution: In /usr/lib/python3.1/email/encoders.py, use encodebytes instead of b64encode: -