[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

2010-03-08 Thread Joaquin Cuenca Abela
Joaquin Cuenca Abela e98cu...@gmail.com added the comment: Thanks David and Barry! As much as it flatters my ego to be in the first place is MISC/ACK, I have to confess that my family name is Cuenca Abela, Cuenca is not a middle name. Cheers, --

[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

2010-03-07 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Your patch looks good, thank you. I just realized that Barry isn't nosy on this issue. I've checked, and the code in question dates back to email version 1.0...code of that long standing that exists specifically to implement the

[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

2010-03-07 Thread Joaquin Cuenca Abela
Joaquin Cuenca Abela e98cu...@gmail.com added the comment: Unfortunately the only way that I can see to reliably work around this is to bypass entirely get_payload, in this case fixing this bug will not affect people that do that negatively. Some people may have more control over their

[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

2010-03-07 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: Thanks for adding me to the nosy list. Yep, this code is pretty old so it doesn't surprise me that its implementation isn't quite right. Of course, I hate get_payload(decode=True) anyway and hope that goes away in email 6. Having said

[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

2010-03-07 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: OK, patch (with comment tweaks to refer to this issue), and email minor version bump, applied to trunk in r78778. It turns out that bdecode was already deleted in email 5 in py3k. I did port the test in r78780. Thanks Joaquin Cuenca

[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

2010-03-04 Thread Joaquin Cuenca Abela
Joaquin Cuenca Abela e98cu...@gmail.com added the comment: Hi, I've never before made a patch to Python, so take it with care. A couple of comments, I reused a test where all the attachments contained an ending newline, except for the base64 one (conveniently...) I think the comment in

[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

2010-03-04 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Thanks for working on this. For the most part your patch looks fine. Two comments: (1) it concerns me that by co-opting the existing test, we are no longer testing that decoding does not introduce a spurious newline :). (2) I think we

[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

2010-03-04 Thread Joaquin Cuenca Abela
Joaquin Cuenca Abela e98cu...@gmail.com added the comment: I added a new subpart to msg_10.txt, that keeps the previous test and also tests the new behavior. Let me know if it's ok like this or if you still prefer to create a different msg file for testing this. Thanks, -- versions:

[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

2010-03-03 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Ah, I misunderstood, and did not see that the newline in question was inside the base64 string. Thank you for pointing out my mistake. Would either of you like to propose a patch, including a test case? (I've removed 2.5 because it is

[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

2010-03-03 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- versions: -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7143 ___ ___