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.

classification
Title: \r to match add into address header with not-ascii character
Type: behavior Stage: resolved
Components: email Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: barry, ikrivosheev, r.david.murray
Priority: normal Keywords: patch

Created on 2018-10-18 09:38 by ikrivosheev, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
email1.py ikrivosheev, 2018-10-18 09:38
Pull Requests
URL Status Linked Edit
PR 9947 closed ikrivosheev, 2018-10-18 10:31
Messages (2)
msg327950 - (view) Author: Ivan Krivosheev (ikrivosheev) * Date: 2018-10-18 09:38
When convert email.message.Message to bytes, into header with non-ascii character in address add to match *\r* symbol.

Simple script for reproduce problem:

    >>> from email.message import Message
    >>> from email.policy import SMTP
    >>> msg = Message(policy=SMTP)
    >>> msg['To'] = 'Юзер Один <user1@example.com>'
    >>> print(msg.as_bytes())

On python 3.5 result:

    >>> b'To: =?utf-8?b?0K7Qt9C10YAg0J7QtNC40L0=?= <user1@example.com>\r\n\r\n'


On python 3.6, python 3.7:

   >>> b'To:\r\n =?utf-8?b?0K7Qt9C10YAg0J7QtNC40L0=?= <user1@example.com>\r\r\r\r\r\n\r\n'
msg328010 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2018-10-19 00:05
Thanks for the report and patch, but this is a duplicate of #34424.  Your report prompted me to finally review the PR in that issue, though, so thanks twice :)
History
Date User Action Args
2022-04-11 14:59:07adminsetgithub: 79197
2018-10-19 00:05:47r.david.murraysetstatus: open -> closed
resolution: duplicate
messages: + msg328010

stage: patch review -> resolved
2018-10-18 10:31:56ikrivosheevsetkeywords: + patch
stage: patch review
pull_requests: + pull_request9297
2018-10-18 10:26:08ikrivosheevsetversions: + Python 3.8
2018-10-18 09:38:34ikrivosheevcreate