This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bpoaugust
Recipients barry, bpoaugust, eric.smith, r.david.murray
Date 2022-01-18.23:49:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642549798.2.0.698616491121.issue46392@roundup.psfhosted.org>
In-reply-to
Content
Sorry, I think '<A@A.A.A A.A>' is not valid, as spaces are not allowed between words.

However I am not seeing the original unfolded source if there is an error, unless I am misunderstanding the API.

For example:

--- cut here ---
import email.header
import email.utils
import email.policy

def test(test):
    msg_string = f"Message-id: {test}"
    message = email.message_from_string(msg_string, policy=email.policy.default)
    out = message['Message-id']
    print(test)
    print(out)

test('<A@A.A.A A.A>') # invalid
test('<A@A.A.AA.A>') # valid
--- cut here ---

This produces:

<A@A.A.A A.A>
<A@A.A.A> # truncated at error
<A@A.A.AA.A>
<A@A.A.AA.A>

i.e. the invalid input is truncated
History
Date User Action Args
2022-01-18 23:49:58bpoaugustsetrecipients: + bpoaugust, barry, eric.smith, r.david.murray
2022-01-18 23:49:58bpoaugustsetmessageid: <1642549798.2.0.698616491121.issue46392@roundup.psfhosted.org>
2022-01-18 23:49:58bpoaugustlinkissue46392 messages
2022-01-18 23:49:58bpoaugustcreate