Accepting request 1037264 from devel:languages:python:mailman
OBS-URL: https://build.opensuse.org/request/show/1037264 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-django-mailman3?expand=0&rev=11
This commit is contained in:
commit
bea83cbbae
43
dj40.patch
43
dj40.patch
@ -1,43 +0,0 @@
|
||||
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
|
||||
diff --git a/setup.py b/setup.py
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -38,7 +38,7 @@
|
||||
packages=find_packages(),
|
||||
include_package_data=True,
|
||||
install_requires=[
|
||||
- 'django>=2.2,<3.3',
|
||||
+ 'django>=2.2,<4.1',
|
||||
'mailmanclient>=3.3.3',
|
||||
'django-allauth',
|
||||
'django-gravatar2 >= 1.0.6',
|
73
dj41.patch
73
dj41.patch
@ -1,73 +0,0 @@
|
||||
Index: django-mailman3-1.3.7/django_mailman3/tests/test_lib_auth_fedora_provider.py
|
||||
===================================================================
|
||||
--- django-mailman3-1.3.7.orig/django_mailman3/tests/test_lib_auth_fedora_provider.py
|
||||
+++ django-mailman3-1.3.7/django_mailman3/tests/test_lib_auth_fedora_provider.py
|
||||
@@ -71,22 +71,6 @@ class TestFedoraProvider(TestCase):
|
||||
username = FedoraProvider(req).extract_username(self.complete_response)
|
||||
self.assertEqual(username, 'bob')
|
||||
|
||||
- def test_extract_commmon_fields(self):
|
||||
- # This this test we patch super(FedoraProvider, provider) so that it's
|
||||
- # complicated extract_common_fields method is not called. It is too
|
||||
- # complicated to try to find the return value and built a mock that
|
||||
- # satisfies the request. The only relevant output from this we need is
|
||||
- # a dictionary which is then extended by our FedoraProvider class.
|
||||
- mock_parent = Mock()
|
||||
- mock_parent.extract_common_fields.return_value = {}
|
||||
- # To patch the superclass, we patch the super() builtin.
|
||||
- with patch('builtins.super') as super_mock:
|
||||
- super_mock.return_value = mock_parent
|
||||
- req = self.factory.get('/')
|
||||
- provider = FedoraProvider(req)
|
||||
- res = provider.extract_common_fields(self.complete_response)
|
||||
- self.assertEqual(res, {'username': 'bob'})
|
||||
-
|
||||
def test_extract_email_addresses(self):
|
||||
with patch('django_mailman3.lib.auth.fedora.provider'
|
||||
'.get_email_from_response') as email_mock:
|
||||
Index: django-mailman3-1.3.7/setup.py
|
||||
===================================================================
|
||||
--- django-mailman3-1.3.7.orig/setup.py
|
||||
+++ django-mailman3-1.3.7/setup.py
|
||||
@@ -38,7 +38,7 @@ setup(
|
||||
packages=find_packages(),
|
||||
include_package_data=True,
|
||||
install_requires=[
|
||||
- 'django>=2.2,<4.1',
|
||||
+ 'django>=2.2,<4.2',
|
||||
'mailmanclient>=3.3.3',
|
||||
'django-allauth',
|
||||
'django-gravatar2 >= 1.0.6',
|
||||
Index: django-mailman3-1.3.7/tox.ini
|
||||
===================================================================
|
||||
--- django-mailman3-1.3.7.orig/tox.ini
|
||||
+++ django-mailman3-1.3.7/tox.ini
|
||||
@@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
-envlist = py{36,37,38,39}-django{22,31,32,latest},lint
|
||||
+envlist = py{37,38,39}-django{32,40,41,latest},lint
|
||||
|
||||
|
||||
[testenv]
|
||||
@@ -7,10 +7,9 @@ usedevelop = True
|
||||
deps =
|
||||
dev: -e../mailmanclient
|
||||
git+https://gitlab.com/mailman/mailmanclient.git
|
||||
- django22: Django>=2.2,<2.3
|
||||
- django30: Django>=3.0,<3.1
|
||||
- django31: Django>=3.1,<3.2
|
||||
django32: Django>=3.2,<3.3
|
||||
+ django40: Django>=4.0,<4.1
|
||||
+ django41: Django>=4.1,<4.2
|
||||
djangolatest: https://github.com/django/django/archive/main.tar.gz
|
||||
coverage: coverage
|
||||
commands =
|
||||
@@ -19,7 +18,7 @@ commands =
|
||||
[testenv:coverage]
|
||||
basepython = python3
|
||||
commands =
|
||||
- coverage run {envbindir}/django-admin.py test --settings=django_mailman3.tests.settings_test {posargs:django_mailman3}
|
||||
+ coverage run {envbindir}/django-admin.py test --settings=django_mailman3.tests.settings_test {posargs:django_mailman3} --debug-mode
|
||||
coverage html
|
||||
coverage report -m
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6ea8c24c13e7afe744f18e18e4d19d0e74223e0d9bd5d782deea85dcb865feb7
|
||||
size 404133
|
3
django-mailman3-1.3.8.tar.gz
Normal file
3
django-mailman3-1.3.8.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0b7672890679d09160d9ef874b4a082452be755f1370361e85587cef9cc14455
|
||||
size 411466
|
@ -1,3 +1,20 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 21 08:57:22 UTC 2022 - Andreas Schneider <asn@cryptomilk.org>
|
||||
|
||||
- Fix running the tests on openSUSE Leap 15.4
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 17 16:40:01 UTC 2022 - Andreas Schneider <asn@cryptomilk.org>
|
||||
|
||||
- Update to version 1.3.8
|
||||
* Add support for Django 4.0 and 4.1 (Fixes #55)
|
||||
* Add support for Python 3.10 (See !153)
|
||||
* Fix the Fedora socialaccount provider. (Fixes #50)
|
||||
* Add pagination only when there are more than one pages. (Fixes #58)
|
||||
* Use Pytest as the test runner.
|
||||
- Removed dj40.patch
|
||||
- Removed dj41.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 5 16:05:25 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
|
@ -20,16 +20,12 @@
|
||||
%define skip_python2 1
|
||||
%define modname django_mailman3
|
||||
Name: python-django-mailman3
|
||||
Version: 1.3.7
|
||||
Version: 1.3.8
|
||||
Release: 0
|
||||
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
|
||||
# PATCH-FEATURE-UPSTREAM dj41.patch https://gitlab.com/mailman/django-mailman3/-/merge_requests/170
|
||||
Patch1: dj41.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
@ -44,6 +40,8 @@ BuildRequires: %{python_module Django >= 1.11}
|
||||
BuildRequires: %{python_module django-allauth}
|
||||
BuildRequires: %{python_module django-gravatar2 >= 1.0.6}
|
||||
BuildRequires: %{python_module mailmanclient}
|
||||
BuildRequires: %{python_module pytest-django}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module pytz}
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
@ -52,9 +50,7 @@ BuildRequires: %{python_module pytz}
|
||||
Django library to help interaction with Mailman.
|
||||
|
||||
%prep
|
||||
%setup -q -n django-mailman3-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%autosetup -p1 -n django-mailman3-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@ -64,7 +60,8 @@ Django library to help interaction with Mailman.
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%python_expand PYTHONPATH='%{buildroot}%{$python_sitelib}' $python -m django test -v2 --settings=django_mailman3.tests.settings_test
|
||||
export PYTHONPATH="$(pwd)"
|
||||
%pytest
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.rst
|
||||
|
Loading…
Reference in New Issue
Block a user