mirror of
https://github.com/python/cpython.git
synced 2025-08-11 04:19:06 +00:00
fixup! Stop incorrectly RFC 2047 encoding non-ASCII email addresses
- Incorporate PR feedback - Tailor blurbs to individual issues
This commit is contained in:
parent
61ac0d75f0
commit
43eaea1fb8
4 changed files with 18 additions and 13 deletions
|
@ -2846,8 +2846,8 @@ def _refold_parse_tree(parse_tree, *, policy):
|
|||
want_encoding = False
|
||||
else:
|
||||
raise errors.InvalidMailboxError(
|
||||
"Non-ASCII address requires policy with utf8=True:"
|
||||
" '{}'".format(part)
|
||||
f"Non-ASCII mailbox '{part}' is invalid"
|
||||
" under current policy setting (utf8=False)"
|
||||
)
|
||||
|
||||
if want_encoding and not wrap_as_ew_blocked:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue