- Add dj41.patch to make it compatible with django 4.1 based on
https://gitlab.com/mailman/django-mailman3/-/merge_requests/170 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:mailman/python-django-mailman3?expand=0&rev=24
This commit is contained in:
parent
b4813c682d
commit
88eeda9f21
73
dj41.patch
Normal file
73
dj41.patch
Normal file
@ -0,0 +1,73 @@
|
||||
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 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 5 16:05:25 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Add dj41.patch to make it compatible with django 4.1 based on
|
||||
https://gitlab.com/mailman/django-mailman3/-/merge_requests/170
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 14 18:43:40 UTC 2022 - Jacob Michalskie <hel@lcp.world>
|
||||
|
||||
|
@ -28,6 +28,8 @@ 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
|
||||
@ -52,6 +54,7 @@ Django library to help interaction with Mailman.
|
||||
%prep
|
||||
%setup -q -n django-mailman3-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
Loading…
Reference in New Issue
Block a user