[issue32182] Infinite recursion in email.message.as_string()

2017-12-03 Thread R. David Murray
R. David Murray added the comment: I checked, and your example works correctly with the patch applied. I've committed the PR. Let me know if you find any other issues (there are several open issues with exactly how headers are wrapped, but I don't think there are any open where serializatio

[issue32182] Infinite recursion in email.message.as_string()

2017-12-01 Thread R. David Murray
R. David Murray added the comment: It is gh-3488 if you want to try it out. Feedback welcome. -- ___ Python tracker ___ ___ Python-

[issue32182] Infinite recursion in email.message.as_string()

2017-12-01 Thread Silla Rizzoli
Silla Rizzoli added the comment: Ok, thanks! I'm writing a program to convert Outlook for Mac backup files (.olm) into plain mbox files as a way to teach myself Python (and at the same time regain control of my email), so I have tens of thousand of emails to test your new code on, if you feel yo

[issue32182] Infinite recursion in email.message.as_string()

2017-11-30 Thread Silla Rizzoli
New submission from Silla Rizzoli : Sometimes RFC-correct email headers do not get folded correctly; the example code below results in an infinite recursion exception. import sys import mailbox from email.message import EmailMessage from email.headerregistry import Address from email import pol

[issue32182] Infinite recursion in email.message.as_string()

2017-11-30 Thread R. David Murray
R. David Murray added the comment: This is almost certainly either a duplicate or will be fixed by a PR I have pending, that I don't have time to look for right now, that rewrites the folder. I'll try to get to merging that PR soonish, but it might not happen before the holidays ;)