[issue9298] binary email attachment issue with base64 encoding

2011-03-16 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 062d09d7bf94 by R David Murray in branch '3.1': #9298: restore proper folding of base64 encoded bodies. http://hg.python.org/cpython/rev/062d09d7bf94 New changeset c34320d9095e by R David Murray in branch '3.2': Merge #9298 fix.

[issue9298] binary email attachment issue with base64 encoding

2011-03-16 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I talked with Barry, who could find no relevant discussions in his email logs. We decided that _bencode was misguided in the first place (this is reinforced by the bug I fixed a year ago where email was stripping the final newline off a

[issue9298] binary email attachment issue with base64 encoding

2011-03-11 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Unfortunately we don't have enough history information to determine who wrote the original _bencode function, although very likely it was Barry. As for the test, that seems to have been written during the python3 translation to make

[issue9298] binary email attachment issue with base64 encoding

2011-02-13 Thread Yves Dorfsman
Changes by Yves Dorfsman y...@zioup.com: Removed file: http://bugs.python.org/file20742/issue9298-test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9298 ___

[issue9298] binary email attachment issue with base64 encoding

2011-02-13 Thread Yves Dorfsman
Changes by Yves Dorfsman y...@zioup.com: Removed file: http://bugs.python.org/file20743/issue9298.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9298 ___

[issue9298] binary email attachment issue with base64 encoding

2011-02-13 Thread Yves Dorfsman
Yves Dorfsman y...@zioup.com added the comment: encoders.py: Fixes the issue of base64'ed being 76 chars test_email.py: -test that base64'ed binary is split into 76 chars lines -WARRNING: Changes the test for MIMEApplication.test_body: -it changes the name of the variable 'bytes' to

[issue9298] binary email attachment issue with base64 encoding

2011-02-12 Thread Yves Dorfsman
Yves Dorfsman y...@zioup.com added the comment: I will. Please don't use my patch yet, it breaks something else in the test_email: ./python Lib/test/regrtest.py test_email [1/1] test_email test test_email failed -- Traceback (most recent call last): File

[issue9298] binary email attachment issue with base64 encoding

2011-02-12 Thread Yves Dorfsman
Yves Dorfsman y...@zioup.com added the comment: I've got two issues with this code (Lib/email/test/test_email.py): 1128 def test_body(self): 1129 eq = self.assertEqual 1130 bytes = b'\xfa\xfb\xfc\xfd\xfe\xff' 1131 msg = MIMEApplication(bytes) 1132

[issue9298] binary email attachment issue with base64 encoding

2011-02-11 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Yves: thanks for the patches. If you feel like redoing the test one as a patch against Lib/email/test/test_email.py, that would be great. I'd suggest having the test just split the lines and do assertLessEqual(max([len(x) for x in

[issue9298] binary email attachment issue with base64 encoding

2011-02-10 Thread Yves Dorfsman
Yves Dorfsman y...@zioup.com added the comment: Test if email.encoders.encode_base64 returns a single line string, or a string broken up in 76 chars line, as per RFC. -- Added file: http://bugs.python.org/file20742/issue9298-test.py ___ Python

[issue9298] binary email attachment issue with base64 encoding

2011-02-10 Thread Yves Dorfsman
Yves Dorfsman y...@zioup.com added the comment: Replaces b64encode by encodebytes. -- keywords: +patch Added file: http://bugs.python.org/file20743/issue9298.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9298

[issue9298] binary email attachment issue with base64 encoding

2011-02-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: See also duplicate issue 11156. -- nosy: +y...@zioup.com ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9298 ___

[issue9298] binary email attachment issue with base64 encoding

2011-02-09 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9298 ___ ___

[issue9298] binary email attachment issue with base64 encoding

2011-02-09 Thread Yves Dorfsman
Yves Dorfsman y...@zioup.com added the comment: Solution: In /usr/lib/python3.1/email/encoders.py, use encodebytes instead of b64encode: --- encoders.py 2011-02-08 09:37:21.025030051 -0700 +++ encoders.py.yves2011-02-08 09:38:04.945608365 -0700 @@ -12,7 +12,7 @@ ] -from base64

[issue9298] binary email attachment issue with base64 encoding

2011-02-09 Thread Yves Dorfsman
Yves Dorfsman y...@zioup.com added the comment: #!/usr/bin/python3.1 import unittest import email.mime.image class emailEncoderTestCase(unittest.TestCase): def setUp(self): # point to an image binaryfile = '/usr/share/openclipart/png/animals/mammals/happy_monkey_benji_park_01.png'

[issue9298] binary email attachment issue with base64 encoding

2011-02-09 Thread Yves Dorfsman
Yves Dorfsman y...@zioup.com added the comment: Here's a better version (sorry I don't know how to remove msg128255: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9298 ___

[issue9298] binary email attachment issue with base64 encoding

2011-02-09 Thread Yves Dorfsman
Yves Dorfsman y...@zioup.com added the comment: #!/usr/bin/python3.1 import unittest import email.mime.image class emailEncoderTestCase(unittest.TestCase): def setUp(self): # point to an image binaryfile = '' #binaryfile =

[issue9298] binary email attachment issue with base64 encoding

2010-12-27 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9298 ___ ___

[issue9298] binary email attachment issue with base64 encoding

2010-07-19 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Can you try this against 3.1 from svn (or py3k from svn)? A bug was fixed that might be relevant. Alternatively a unit test that demonstrates the problem would be most helpful. -- assignee: - r.david.murray nosy:

[issue9298] binary email attachment issue with base64 encoding

2010-07-19 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9298 ___ ___ Python-bugs-list

[issue9298] binary email attachment issue with base64 encoding

2010-07-19 Thread Vance Unruh
Vance Unruh vun...@earthlink.net added the comment: Here's code that attaches the pdf file the two different ways. Both attachments are OK when I read the mail on OSX, but one is corrupt when read with Windows Mail on Vista. I wasn't sure what to do with the actual sending of the mail to the

[issue9298] binary email attachment issue with base64 encoding

2010-07-18 Thread Vance Unruh
New submission from Vance Unruh vun...@earthlink.net: I'm using Python to email a text version and a PDF version of a report. The standard way of doing things does not work with Vista's Mail program, but works fine with Mail on OSX. So, I don't know if this is a Python or a Vista Mail bug. By