Accepting request 956322 from home:gladiac:mailman3
- Make compatible with django 4.0 * Added postorius-fix-django-4.0-compatibility.patch OBS-URL: https://build.opensuse.org/request/show/956322 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:mailman/python-postorius?expand=0&rev=34
This commit is contained in:
parent
a01ea5f503
commit
88642621c5
83
postorius-fix-django-4.0-compatibility.patch
Normal file
83
postorius-fix-django-4.0-compatibility.patch
Normal file
@ -0,0 +1,83 @@
|
||||
From db2bd36a76f21d0637b5b7894f564918161c3185 Mon Sep 17 00:00:00 2001
|
||||
From: David Runge <dave@sleepmap.de>
|
||||
Date: Sun, 20 Feb 2022 18:20:27 +0000
|
||||
Subject: [PATCH] Make compatible with django 4.0
|
||||
|
||||
---
|
||||
.gitlab-ci.yml | 14 ++++++++++++--
|
||||
setup.py | 2 +-
|
||||
src/postorius/doc/news.rst | 1 +
|
||||
src/postorius/forms/fields.py | 11 +++++++++--
|
||||
tox.ini | 5 +++--
|
||||
5 files changed, 26 insertions(+), 7 deletions(-)
|
||||
|
||||
Index: postorius-1.3.6/setup.py
|
||||
===================================================================
|
||||
--- postorius-1.3.6.orig/setup.py 2022-02-21 08:32:54.275160495 +0100
|
||||
+++ postorius-1.3.6/setup.py 2022-02-21 08:32:56.591175549 +0100
|
||||
@@ -54,7 +54,7 @@ setup(
|
||||
include_package_data=True,
|
||||
install_requires=[
|
||||
'django-mailman3>=1.3.7',
|
||||
- 'django>=2.2,<3.3',
|
||||
+ 'django>=2.2,<4.1',
|
||||
'mailmanclient>=3.3.3',
|
||||
'readme_renderer[md]',
|
||||
],
|
||||
Index: postorius-1.3.6/src/postorius/forms/fields.py
|
||||
===================================================================
|
||||
--- postorius-1.3.6.orig/src/postorius/forms/fields.py 2022-02-21 08:32:54.275160495 +0100
|
||||
+++ postorius-1.3.6/src/postorius/forms/fields.py 2022-02-21 08:32:56.591175549 +0100
|
||||
@@ -19,7 +19,14 @@
|
||||
|
||||
|
||||
from django import forms
|
||||
-from django.utils.encoding import smart_text
|
||||
+
|
||||
+
|
||||
+try:
|
||||
+ from django.utils.encoding import smart_str
|
||||
+except ImportError:
|
||||
+ # django < 4.0
|
||||
+ from django.utils.encoding import smart_text as smart_str
|
||||
+
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from postorius.utils import with_empty_choice
|
||||
@@ -62,7 +69,7 @@ class ListOfStringsField(forms.Field):
|
||||
line = line.strip()
|
||||
if not line:
|
||||
continue
|
||||
- result.append(smart_text(line))
|
||||
+ result.append(smart_str(line))
|
||||
return result
|
||||
|
||||
|
||||
Index: postorius-1.3.6/tox.ini
|
||||
===================================================================
|
||||
--- postorius-1.3.6.orig/tox.ini 2022-02-21 08:32:54.275160495 +0100
|
||||
+++ postorius-1.3.6/tox.ini 2022-02-21 08:32:56.591175549 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
-envlist = py{36,37,38,39}-django{22,31,32,-latest},qa
|
||||
+envlist = py{36,37,38,39,310}-django{22,31,32,-latest},qa
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
@@ -19,6 +19,7 @@ deps =
|
||||
django30: Django>=3.0,<3.1
|
||||
django31: Django>=3.1,<3.2
|
||||
django32: Django>=3.2,<3.3
|
||||
+ django40: Django>=4.0,<4.1
|
||||
django-latest: https://github.com/django/django/archive/main.tar.gz
|
||||
commands =
|
||||
pytest {posargs:../src}
|
||||
@@ -30,7 +31,7 @@ setenv =
|
||||
basepython = python3
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
- Django>=3.2,<3.3
|
||||
+ Django>=3.2,<4.1
|
||||
coverage
|
||||
commands =
|
||||
coverage run -m pytest {posargs:../src/postorius}
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 21 07:31:26 UTC 2022 - Andreas Schneider <asn@cryptomilk.org>
|
||||
|
||||
- Make compatible with django 4.0
|
||||
* Added postorius-fix-django-4.0-compatibility.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 18 18:03:59 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
@ -48,6 +48,9 @@ Source12: postorius.uwsgi
|
||||
Source20: README.SUSE.md
|
||||
#
|
||||
Patch0: postorius-settings.patch
|
||||
# Make compatible with django 4.0
|
||||
# https://gitlab.com/mailman/postorius/-/commit/db2bd36a76f21d0637b5b7894f564918161c3185
|
||||
Patch1: postorius-fix-django-4.0-compatibility.patch
|
||||
#
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
|
Loading…
Reference in New Issue
Block a user