Irit Katriel <iritkatr...@gmail.com> added the comment:
This is working now: >>> import sys, email >>> mail = email.message_from_string( ... """From: <postmas...@example.com> ... To: <bou...@example.com> ... Subject: demo ... X-Overlong-Header-Name-causes-python-mail-to-crash-in-re-serialization-example: ... ... Hello ... """) >>> >>> mail <email.message.Message object at 0x000001AA13FD36D0> >>> message = mail.as_string() >>> sys.stdout.write(message) From: <postmas...@example.com> To: <bou...@example.com> Subject: demo X-Overlong-Header-Name-causes-python-mail-to-crash-in-re-serialization-example: Hello 158 >>> ---------- nosy: +iritkatriel resolution: -> fixed status: open -> pending _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31314> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com