Closed
Description
Bug report
Bug description:
Bug Report
My test suit is failing 2 tests on python3.11.9. These are working fine on 3.11.7 and 3.11.8.
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 40-42: surrogates not allowed
.tox/django42/lib/python3.11/site-packages/django/core/mail/message.py:168: in set_payload
has_long_lines = any(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.0 = <list_iterator object at 0x7fe402eaf730>
has_long_lines = any(
> len(line.encode()) > RFC5322_EMAIL_LINE_LENGTH_LIMIT
for line in payload.splitlines()
)
E UnicodeEncodeError: 'utf-8' codec can't encode characters in position 40-42: surrogates not allowed
I did't find any thing in release notes.
CPython versions tested on:
3.11
Operating systems tested on:
Linux