1
0
forked from pool/python-Django

Accepting request 1168719 from home:dgarcia:branches:devel:languages:python:Factory

- Add fix-safemimetext-set_payload.patch, to support python 3.11.9+
  (gh#django/django@b231bcd19e57, bsc#1222880)

OBS-URL: https://build.opensuse.org/request/show/1168719
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:django/python-Django?expand=0&rev=163
This commit is contained in:
Daniel Garcia 2024-04-18 06:46:26 +00:00 committed by Git OBS Bridge
parent 1bea54f3d7
commit 272ab117ae
3 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,14 @@
Index: Django-4.2.11/django/core/mail/message.py
===================================================================
--- Django-4.2.11.orig/django/core/mail/message.py
+++ Django-4.2.11/django/core/mail/message.py
@@ -168,7 +168,8 @@ class SafeMIMEText(MIMEMixin, MIMEText):
def set_payload(self, payload, charset=None):
if charset == "utf-8" and not isinstance(charset, Charset.Charset):
has_long_lines = any(
- len(line.encode()) > RFC5322_EMAIL_LINE_LENGTH_LIMIT
+ len(line.encode(errors="surrogateescape"))
+ > RFC5322_EMAIL_LINE_LENGTH_LIMIT
for line in payload.splitlines()
)
# Quoted-Printable encoding has the side effect of shortening long

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Apr 18 06:39:36 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
- Add fix-safemimetext-set_payload.patch, to support python 3.11.9+
(gh#django/django@b231bcd19e57, bsc#1222880)
-------------------------------------------------------------------
Mon Mar 4 14:05:28 UTC 2024 - Alberto Planas Dominguez <aplanas@suse.com>

View File

@ -37,6 +37,9 @@ Source99: python-Django-rpmlintrc
Patch0: sanitize_address.patch
# PATCH-FIX-OPENSUSE: ignore minor failure on Python 3.12
Patch1: dirty-hack-remove-assert.patch
# PATCH-FIX-UPSTREAM: fix-safemimetext-set_payload.patch, gh#django/django@b231bcd19e57
# Add support for python 3.11.9+
Patch2: fix-safemimetext-set_payload.patch
BuildRequires: %{python_module Jinja2 >= 2.9.2}
BuildRequires: %{python_module Pillow >= 6.2.0}
BuildRequires: %{python_module PyYAML}