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
This commit is contained in:
Matej Cepl 2021-12-28 11:02:38 +00:00 committed by Git OBS Bridge
parent 43e2298f1c
commit b90d3354cd
3 changed files with 41 additions and 2 deletions

31
dj40.patch Normal file
View File

@ -0,0 +1,31 @@
commit 6cfc4c87bc445592a1a020ee877bd8fead3d8e39
Author: John Vandenberg <jayvdb@gmail.com>
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

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Dec 26 22:49:13 UTC 2021 - John Vandenberg <jayvdb@gmail.com>
- Add dj40.patch for Django 4.0 compatibility
-------------------------------------------------------------------
Wed Nov 17 08:37:21 UTC 2021 - Andreas Schneider <asn@cryptomilk.org>

View File

@ -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