1 |
commit: 88a8bbd7e89ffda56a41ddabf33796636e85fff0 |
2 |
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 27 09:27:37 2021 +0000 |
4 |
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 27 09:29:05 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88a8bbd7 |
7 |
|
8 |
net-mail/mailman: add 3.3.4, enable tests, enable py3.9 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/805017 |
11 |
Closes: https://bugs.gentoo.org/809173 |
12 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> |
13 |
|
14 |
net-mail/mailman/Manifest | 1 + |
15 |
.../mailman/files/mailman-3.3.4-fix-click-8.patch | 75 ++++++++++++++++++++++ |
16 |
.../files/mailman-3.3.4-py3.9-importlib.patch | 73 +++++++++++++++++++++ |
17 |
net-mail/mailman/mailman-3.3.4.ebuild | 60 +++++++++++++++++ |
18 |
4 files changed, 209 insertions(+) |
19 |
|
20 |
diff --git a/net-mail/mailman/Manifest b/net-mail/mailman/Manifest |
21 |
index f87f5acd155..0772b97b920 100644 |
22 |
--- a/net-mail/mailman/Manifest |
23 |
+++ b/net-mail/mailman/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
DIST mailman-3.3.2.tar.gz 1396750 BLAKE2B f7db82d8cb217d80313ee7a6c28f7b62876a6d176a108b3fafdc744e0a9fcec3d11a0665069a5c27a42d49c22257bfe2ca8f18233d30fc9acb964027fea3bf12 SHA512 af8b300a9fea9e40a9a42f97531cf0fcd36f9b30a88a5b062994ec6480d91a698dbc37f4910045aacf3bedebf7c9ccacdf8d11bb0ee560d11e1eeef266f19b29 |
26 |
+DIST mailman-3.3.4.tar.gz 1578084 BLAKE2B d0c8ba6dd0df481915397b55521c9a524b44bbdb7c4efe789c6fe92c1383950b6107a76db43337b7a310a7d97eb3931a4289566271ac5b6360645ec8d316230a SHA512 52d7e8355744730f608605b05bc9c977c3e4daf22a78267b1ea6cd3922b2826d3f70dd61a591f13633fc7cbcc536b6d56a2076c00752a6590964cbd4e1aec3cc |
27 |
|
28 |
diff --git a/net-mail/mailman/files/mailman-3.3.4-fix-click-8.patch b/net-mail/mailman/files/mailman-3.3.4-fix-click-8.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..c5f5d774fda |
31 |
--- /dev/null |
32 |
+++ b/net-mail/mailman/files/mailman-3.3.4-fix-click-8.patch |
33 |
@@ -0,0 +1,75 @@ |
34 |
+From 5d27492403f80c4b4ea1820b3d6f821bd8401ca8 Mon Sep 17 00:00:00 2001 |
35 |
+From: Mark Sapiro <mark@×××××××.net> |
36 |
+Date: Tue, 11 May 2021 18:14:59 -0700 |
37 |
+Subject: [PATCH] Require click >=8.0.0 and fix the tests it breaks. |
38 |
+ |
39 |
+--- a/src/mailman/commands/docs/import.rst |
40 |
++++ b/src/mailman/commands/docs/import.rst |
41 |
+@@ -58,5 +58,6 @@ import, the mailing list's "real name" will change. |
42 |
+ Import |
43 |
+ |
44 |
+ >>> command('mailman import21 import@×××××××.com ' + pickle_file) |
45 |
++ Importing ... |
46 |
+ >>> print(mlist.display_name) |
47 |
+ Test |
48 |
+--- a/src/mailman/commands/tests/test_cli_addmembers.py |
49 |
++++ b/src/mailman/commands/tests/test_cli_addmembers.py |
50 |
+@@ -57,8 +57,8 @@ class TestCLIAddMembers(unittest.TestCase): |
51 |
+ result.output, |
52 |
+ 'Usage: addmembers [OPTIONS] FILENAME LISTSPEC\n' |
53 |
+ 'Try \'addmembers --help\' for help.\n\n' |
54 |
+- 'Error: Invalid value for \'FILENAME\': Could not open ' |
55 |
+- 'file: bad: No such file or directory\n') |
56 |
++ 'Error: Invalid value for \'FILENAME\': ' |
57 |
++ '\'bad\': No such file or directory\n') |
58 |
+ |
59 |
+ def test_already_subscribed_with_display_name(self): |
60 |
+ subscribe(self._mlist, 'Anne') |
61 |
+@@ -265,8 +265,8 @@ class TestCLIAddMembers(unittest.TestCase): |
62 |
+ 'Usage: addmembers [OPTIONS] FILENAME LISTSPEC\n' |
63 |
+ 'Try \'addmembers --help\' for help.\n\n' |
64 |
+ 'Error: Invalid value for \'--delivery\' / \'-d\': ' |
65 |
+- 'invalid choice: bogus. (choose from regular, mime, ' |
66 |
+- 'plain, summary, disabled)\n') |
67 |
++ '\'bogus\' is not one of \'regular\', \'mime\', ' |
68 |
++ '\'plain\', \'summary\', \'disabled\'.\n') |
69 |
+ |
70 |
+ def test_invite_member(self): |
71 |
+ with NamedTemporaryFile('w', buffering=1, encoding='utf-8') as infp: |
72 |
+--- a/src/mailman/commands/tests/test_cli_delmembers.py |
73 |
++++ b/src/mailman/commands/tests/test_cli_delmembers.py |
74 |
+@@ -56,8 +56,8 @@ class TestCLIDelMembers(unittest.TestCase): |
75 |
+ result.output, |
76 |
+ 'Usage: delmembers [OPTIONS]\n' |
77 |
+ 'Try \'delmembers --help\' for help.\n\n' |
78 |
+- 'Error: Invalid value for \'--file\' / \'-f\': Could not open ' |
79 |
+- 'file: bad: No such file or directory\n') |
80 |
++ 'Error: Invalid value for \'--file\' / \'-f\': ' |
81 |
++ '\'bad\': No such file or directory\n') |
82 |
+ |
83 |
+ def test_not_subscribed_without_display_name(self): |
84 |
+ with NamedTemporaryFile('w', buffering=1, encoding='utf-8') as infp: |
85 |
+--- a/src/mailman/commands/tests/test_cli_syncmembers.py |
86 |
++++ b/src/mailman/commands/tests/test_cli_syncmembers.py |
87 |
+@@ -58,8 +58,8 @@ class TestCLISyncMembers(unittest.TestCase): |
88 |
+ result.output, |
89 |
+ 'Usage: syncmembers [OPTIONS] FILENAME LISTSPEC\n' |
90 |
+ 'Try \'syncmembers --help\' for help.\n\n' |
91 |
+- 'Error: Invalid value for \'FILENAME\': Could not open ' |
92 |
+- 'file: bad: No such file or directory\n') |
93 |
++ 'Error: Invalid value for \'FILENAME\': ' |
94 |
++ '\'bad\': No such file or directory\n') |
95 |
+ |
96 |
+ def test_sync_invalid_email(self): |
97 |
+ with NamedTemporaryFile('w', buffering=1, encoding='utf-8') as infp: |
98 |
+@@ -374,8 +374,8 @@ class TestCLISyncMembers(unittest.TestCase): |
99 |
+ 'Usage: syncmembers [OPTIONS] FILENAME LISTSPEC\n' |
100 |
+ 'Try \'syncmembers --help\' for help.\n\n' |
101 |
+ 'Error: Invalid value for \'--delivery\' / \'-d\': ' |
102 |
+- 'invalid choice: bogus. (choose from regular, mime, ' |
103 |
+- 'plain, summary, disabled)\n') |
104 |
++ '\'bogus\' is not one of \'regular\', \'mime\', ' |
105 |
++ '\'plain\', \'summary\', \'disabled\'.\n') |
106 |
+ |
107 |
+ def test_override_no_welcome(self): |
108 |
+ self._mlist.send_welcome_message = False |
109 |
|
110 |
diff --git a/net-mail/mailman/files/mailman-3.3.4-py3.9-importlib.patch b/net-mail/mailman/files/mailman-3.3.4-py3.9-importlib.patch |
111 |
new file mode 100644 |
112 |
index 00000000000..f8771678b3e |
113 |
--- /dev/null |
114 |
+++ b/net-mail/mailman/files/mailman-3.3.4-py3.9-importlib.patch |
115 |
@@ -0,0 +1,73 @@ |
116 |
+From 0eced2d273535577645493340c7319ebf27a559c Mon Sep 17 00:00:00 2001 |
117 |
+From: Neal Gompa <ngompa13@×××××.com> |
118 |
+Date: Fri, 16 Oct 2020 03:47:38 -0400 |
119 |
+Subject: [PATCH] Use importlib.resources for Python 3.9+ and |
120 |
+ importlib_resources otherwise |
121 |
+ |
122 |
+This makes it possible to use Mailman 3 in environments where importlib_resources |
123 |
+is not available. |
124 |
+ |
125 |
+Signed-off-by: Neal Gompa <ngompa13@×××××.com> |
126 |
+--- |
127 |
+ setup.py | 2 +- |
128 |
+ src/mailman/__init__.py | 5 +++++ |
129 |
+ src/mailman/testing/__init__.py | 23 +++++++++++++++++++++++ |
130 |
+ 3 files changed, 29 insertions(+), 1 deletion(-) |
131 |
+ |
132 |
+diff --git a/setup.py b/setup.py |
133 |
+index cd3645611..6d871fbfd 100644 |
134 |
+--- a/setup.py |
135 |
++++ b/setup.py |
136 |
+@@ -121,7 +121,7 @@ case second 'm'. Any other spelling is incorrect.""", |
137 |
+ 'flufl.bounce', |
138 |
+ 'flufl.i18n>=2.0', |
139 |
+ 'flufl.lock>=3.1', |
140 |
+- 'importlib_resources>=1.1.0', |
141 |
++ 'importlib_resources>=1.1.0 ; python_version<"3.9"', |
142 |
+ 'gunicorn', |
143 |
+ 'lazr.config', |
144 |
+ 'python-dateutil>=2.0', |
145 |
+diff --git a/src/mailman/__init__.py b/src/mailman/__init__.py |
146 |
+index 2d94288e0..1c760008d 100644 |
147 |
+--- a/src/mailman/__init__.py |
148 |
++++ b/src/mailman/__init__.py |
149 |
+@@ -37,3 +37,8 @@ if 'build_sphinx' not in sys.argv: # pragma: nocover |
150 |
+ else: |
151 |
+ from mailman.core.i18n import initialize |
152 |
+ initialize() |
153 |
++ |
154 |
++# Switch over to the internal importlib.resources module on Python 3.9+ |
155 |
++if sys.version_info >= (3, 9, 0): |
156 |
++ import importlib.resources |
157 |
++ sys.modules['importlib_resources'] = importlib.resources |
158 |
+diff --git a/src/mailman/testing/__init__.py b/src/mailman/testing/__init__.py |
159 |
+index e69de29bb..2b2ed536a 100644 |
160 |
+--- a/src/mailman/testing/__init__.py |
161 |
++++ b/src/mailman/testing/__init__.py |
162 |
+@@ -0,0 +1,23 @@ |
163 |
++# Copyright (C) 2009-2020 by the Free Software Foundation, Inc. |
164 |
++# |
165 |
++# This file is part of GNU Mailman. |
166 |
++# |
167 |
++# GNU Mailman is free software: you can redistribute it and/or modify it under |
168 |
++# the terms of the GNU General Public License as published by the Free |
169 |
++# Software Foundation, either version 3 of the License, or (at your option) |
170 |
++# any later version. |
171 |
++# |
172 |
++# GNU Mailman is distributed in the hope that it will be useful, but WITHOUT |
173 |
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
174 |
++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
175 |
++# more details. |
176 |
++# |
177 |
++# You should have received a copy of the GNU General Public License along with |
178 |
++# GNU Mailman. If not, see <https://www.gnu.org/licenses/>. |
179 |
++ |
180 |
++import sys |
181 |
++ |
182 |
++# Switch over to the internal importlib.resources module on Python 3.9+ |
183 |
++if sys.version_info >= (3, 9, 0): |
184 |
++ import importlib.resources |
185 |
++ sys.modules['importlib_resources'] = importlib.resources |
186 |
+-- |
187 |
+GitLab |
188 |
+ |
189 |
|
190 |
diff --git a/net-mail/mailman/mailman-3.3.4.ebuild b/net-mail/mailman/mailman-3.3.4.ebuild |
191 |
new file mode 100644 |
192 |
index 00000000000..d6f428c545b |
193 |
--- /dev/null |
194 |
+++ b/net-mail/mailman/mailman-3.3.4.ebuild |
195 |
@@ -0,0 +1,60 @@ |
196 |
+# Copyright 1999-2021 Gentoo Authors |
197 |
+# Distributed under the terms of the GNU General Public License v2 |
198 |
+ |
199 |
+EAPI=7 |
200 |
+ |
201 |
+PYTHON_COMPAT=( python3_{8..9} ) |
202 |
+inherit distutils-r1 |
203 |
+ |
204 |
+DESCRIPTION="Mailman -- the GNU mailing list manager" |
205 |
+HOMEPAGE="https://www.list.org" |
206 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
207 |
+ |
208 |
+LICENSE="GPL-3+" |
209 |
+SLOT="3" |
210 |
+KEYWORDS="~amd64" |
211 |
+IUSE="test" |
212 |
+RESTRICT="!test? ( test )" |
213 |
+ |
214 |
+RDEPEND=" |
215 |
+ >=dev-python/aiosmtpd-1.4.1[${PYTHON_USEDEP}] |
216 |
+ dev-python/alembic[${PYTHON_USEDEP}] |
217 |
+ dev-python/atpublic[${PYTHON_USEDEP}] |
218 |
+ >=dev-python/authheaders-0.13.0[${PYTHON_USEDEP}] |
219 |
+ >=dev-python/authres-1.0.1[${PYTHON_USEDEP}] |
220 |
+ >=dev-python/click-8.0[${PYTHON_USEDEP}] |
221 |
+ >=dev-python/dnspython-1.14.0[${PYTHON_USEDEP}] |
222 |
+ >=dev-python/falcon-2.0.0[${PYTHON_USEDEP}] |
223 |
+ dev-python/flufl-bounce[${PYTHON_USEDEP}] |
224 |
+ >=dev-python/flufl-i18n-2.0.1[${PYTHON_USEDEP}] |
225 |
+ >=dev-python/flufl-lock-3.1[${PYTHON_USEDEP}] |
226 |
+ $(python_gen_cond_dep ' |
227 |
+ dev-python/importlib_resources[${PYTHON_USEDEP}] |
228 |
+ ' python3_8) |
229 |
+ www-servers/gunicorn[${PYTHON_USEDEP}] |
230 |
+ dev-python/lazr-config[${PYTHON_USEDEP}] |
231 |
+ >=dev-python/python-dateutil-2.0[${PYTHON_USEDEP}] |
232 |
+ dev-python/passlib[${PYTHON_USEDEP}] |
233 |
+ dev-python/requests[${PYTHON_USEDEP}] |
234 |
+ <dev-python/sqlalchemy-1.4[${PYTHON_USEDEP}] |
235 |
+ dev-python/zope-component[${PYTHON_USEDEP}] |
236 |
+ dev-python/zope-configuration[${PYTHON_USEDEP}] |
237 |
+ dev-python/zope-event[${PYTHON_USEDEP}] |
238 |
+ >=dev-python/zope-interface-5.0[${PYTHON_USEDEP}] |
239 |
+" |
240 |
+BDEPEND=" |
241 |
+ test? ( |
242 |
+ dev-python/flufl-testing[${PYTHON_USEDEP}] |
243 |
+ virtual/python-greenlet[${PYTHON_USEDEP}] |
244 |
+ ) |
245 |
+" |
246 |
+ |
247 |
+PATCHES=( |
248 |
+ "${FILESDIR}/${P}-py3.9-importlib.patch" |
249 |
+ "${FILESDIR}/${P}-fix-click-8.patch" |
250 |
+) |
251 |
+ |
252 |
+python_test() { |
253 |
+ distutils_install_for_testing --via-venv |
254 |
+ "${EPYTHON}" -m nose2 -vv || die "Tests failed with ${EPYTHON}" |
255 |
+} |