From b90d3354cdcb3f8510800999ebfd85bab43dc9fa20183d40af3b05aa7fd90a07 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 28 Dec 2021 11:02:38 +0000 Subject: [PATCH] Accepting request 942880 from home:jayvdb:branches:devel:languages:python:django - Add dj40.patch for Django 4.0 compatibility OBS-URL: https://build.opensuse.org/request/show/942880 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:mailman/python-django-mailman3?expand=0&rev=17 --- dj40.patch | 31 +++++++++++++++++++++++++++++++ python-django-mailman3.changes | 5 +++++ python-django-mailman3.spec | 7 +++++-- 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 dj40.patch diff --git a/dj40.patch b/dj40.patch new file mode 100644 index 0000000..b64cef4 --- /dev/null +++ b/dj40.patch @@ -0,0 +1,31 @@ +commit 6cfc4c87bc445592a1a020ee877bd8fead3d8e39 +Author: John Vandenberg +Date: Mon Dec 27 06:33:03 2021 +0800 + + signals.py: Fix Django 4.0 breakage + +diff --git a/django_mailman3/signals.py b/django_mailman3/signals.py +index 54306eb..20f1b11 100644 +--- a/django_mailman3/signals.py ++++ b/django_mailman3/signals.py +@@ -51,13 +51,13 @@ FIELD_LAST_NAME = 'last_name' + # + # Defined signals + # +-domain_created = Signal(providing_args=["mail_host"]) +-domain_deleted = Signal(providing_args=["mail_host"]) +-mailinglist_created = Signal(providing_args=["list_id"]) +-mailinglist_modified = Signal(providing_args=["list_id"]) +-mailinglist_deleted = Signal(providing_args=["list_id", "delete_archives"]) +-user_subscribed = Signal(providing_args=["list_id", "user_email", "role"]) +-user_unsubscribed = Signal(providing_args=["list_id", "user_email", "role"]) ++domain_created = Signal() ++domain_deleted = Signal() ++mailinglist_created = Signal() ++mailinglist_modified = Signal() ++mailinglist_deleted = Signal() ++user_subscribed = Signal() ++user_unsubscribed = Signal() + + # + # Signals listened to diff --git a/python-django-mailman3.changes b/python-django-mailman3.changes index d8df79e..42efad1 100644 --- a/python-django-mailman3.changes +++ b/python-django-mailman3.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Dec 26 22:49:13 UTC 2021 - John Vandenberg + +- Add dj40.patch for Django 4.0 compatibility + ------------------------------------------------------------------- Wed Nov 17 08:37:21 UTC 2021 - Andreas Schneider diff --git a/python-django-mailman3.spec b/python-django-mailman3.spec index 048842e..654fee4 100644 --- a/python-django-mailman3.spec +++ b/python-django-mailman3.spec @@ -26,6 +26,8 @@ Summary: Django library to help interaction with Mailman License: GPL-3.0-only URL: https://gitlab.com/mailman/django-mailman3 Source: https://files.pythonhosted.org/packages/source/d/django-mailman3/django-mailman3-%{version}.tar.gz +# PATCH-FEATURE-UPSTREAM dj40.patch https://gitlab.com/mailman/django-mailman3/-/merge_requests/150 +Patch0: dj40.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -51,10 +53,11 @@ Obsoletes: python38-django-mailman3 < %{version}-%{release} %python_subpackages %description -Django library to help interaction with Mailman +Django library to help interaction with Mailman. %prep %setup -q -n django-mailman3-%{version} +%patch0 -p1 %build %python_build @@ -64,7 +67,7 @@ Django library to help interaction with Mailman %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_expand PYTHONPATH='.' $python %{_bindir}/django-admin.py test --settings=django_mailman3.tests.settings_test +%python_expand PYTHONPATH='.' $python -m django test -v2 --settings=django_mailman3.tests.settings_test %files %{python_files} %doc README.rst