net-mail/mailman: new package, add 3.3.8

This commit is contained in:
Alarig Le Lay 2023-03-21 20:21:57 +01:00
parent b667b4c8b4
commit 3254b6e9db
Signed by: alarig
GPG Key ID: 7AFE62C6DF8BCDEC
5 changed files with 219 additions and 0 deletions

View File

@ -0,0 +1 @@
DIST mailman-3.3.8.tar.gz 1676901 BLAKE2B b7f15062655ab7526c64b1cede611d02f81d53e9ddba77b5810931922bd71ae2fe909b82037561b491ece6856f7da2015bb7688a86b5c47fa1951d98b95f4115 SHA512 e0b98cc45d3aeaf0c07d331cb598b918343d611dbae4daf82d7182cc6a88f685ff574f7ac7cd5b0bb1dddb7926cacf18a8ee0dca64da352eff417e7c4a673afe

View File

@ -0,0 +1,75 @@
From 5d27492403f80c4b4ea1820b3d6f821bd8401ca8 Mon Sep 17 00:00:00 2001
From: Mark Sapiro <mark@msapiro.net>
Date: Tue, 11 May 2021 18:14:59 -0700
Subject: [PATCH] Require click >=8.0.0 and fix the tests it breaks.
--- a/src/mailman/commands/docs/import.rst
+++ b/src/mailman/commands/docs/import.rst
@@ -58,5 +58,6 @@ import, the mailing list's "real name" will change.
Import
>>> command('mailman import21 import@example.com ' + pickle_file)
+ Importing ...
>>> print(mlist.display_name)
Test
--- a/src/mailman/commands/tests/test_cli_addmembers.py
+++ b/src/mailman/commands/tests/test_cli_addmembers.py
@@ -57,8 +57,8 @@ class TestCLIAddMembers(unittest.TestCase):
result.output,
'Usage: addmembers [OPTIONS] FILENAME LISTSPEC\n'
'Try \'addmembers --help\' for help.\n\n'
- 'Error: Invalid value for \'FILENAME\': Could not open '
- 'file: bad: No such file or directory\n')
+ 'Error: Invalid value for \'FILENAME\': '
+ '\'bad\': No such file or directory\n')
def test_already_subscribed_with_display_name(self):
subscribe(self._mlist, 'Anne')
@@ -265,8 +265,8 @@ class TestCLIAddMembers(unittest.TestCase):
'Usage: addmembers [OPTIONS] FILENAME LISTSPEC\n'
'Try \'addmembers --help\' for help.\n\n'
'Error: Invalid value for \'--delivery\' / \'-d\': '
- 'invalid choice: bogus. (choose from regular, mime, '
- 'plain, summary, disabled)\n')
+ '\'bogus\' is not one of \'regular\', \'mime\', '
+ '\'plain\', \'summary\', \'disabled\'.\n')
def test_invite_member(self):
with NamedTemporaryFile('w', buffering=1, encoding='utf-8') as infp:
--- a/src/mailman/commands/tests/test_cli_delmembers.py
+++ b/src/mailman/commands/tests/test_cli_delmembers.py
@@ -56,8 +56,8 @@ class TestCLIDelMembers(unittest.TestCase):
result.output,
'Usage: delmembers [OPTIONS]\n'
'Try \'delmembers --help\' for help.\n\n'
- 'Error: Invalid value for \'--file\' / \'-f\': Could not open '
- 'file: bad: No such file or directory\n')
+ 'Error: Invalid value for \'--file\' / \'-f\': '
+ '\'bad\': No such file or directory\n')
def test_not_subscribed_without_display_name(self):
with NamedTemporaryFile('w', buffering=1, encoding='utf-8') as infp:
--- a/src/mailman/commands/tests/test_cli_syncmembers.py
+++ b/src/mailman/commands/tests/test_cli_syncmembers.py
@@ -58,8 +58,8 @@ class TestCLISyncMembers(unittest.TestCase):
result.output,
'Usage: syncmembers [OPTIONS] FILENAME LISTSPEC\n'
'Try \'syncmembers --help\' for help.\n\n'
- 'Error: Invalid value for \'FILENAME\': Could not open '
- 'file: bad: No such file or directory\n')
+ 'Error: Invalid value for \'FILENAME\': '
+ '\'bad\': No such file or directory\n')
def test_sync_invalid_email(self):
with NamedTemporaryFile('w', buffering=1, encoding='utf-8') as infp:
@@ -374,8 +374,8 @@ class TestCLISyncMembers(unittest.TestCase):
'Usage: syncmembers [OPTIONS] FILENAME LISTSPEC\n'
'Try \'syncmembers --help\' for help.\n\n'
'Error: Invalid value for \'--delivery\' / \'-d\': '
- 'invalid choice: bogus. (choose from regular, mime, '
- 'plain, summary, disabled)\n')
+ '\'bogus\' is not one of \'regular\', \'mime\', '
+ '\'plain\', \'summary\', \'disabled\'.\n')
def test_override_no_welcome(self):
self._mlist.send_welcome_message = False

View File

@ -0,0 +1,73 @@
From 0eced2d273535577645493340c7319ebf27a559c Mon Sep 17 00:00:00 2001
From: Neal Gompa <ngompa13@gmail.com>
Date: Fri, 16 Oct 2020 03:47:38 -0400
Subject: [PATCH] Use importlib.resources for Python 3.9+ and
importlib_resources otherwise
This makes it possible to use Mailman 3 in environments where importlib_resources
is not available.
Signed-off-by: Neal Gompa <ngompa13@gmail.com>
---
setup.py | 2 +-
src/mailman/__init__.py | 5 +++++
src/mailman/testing/__init__.py | 23 +++++++++++++++++++++++
3 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index cd3645611..6d871fbfd 100644
--- a/setup.py
+++ b/setup.py
@@ -121,7 +121,7 @@ case second 'm'. Any other spelling is incorrect.""",
'flufl.bounce',
'flufl.i18n>=2.0',
'flufl.lock>=3.1',
- 'importlib_resources>=1.1.0',
+ 'importlib_resources>=1.1.0 ; python_version<"3.9"',
'gunicorn',
'lazr.config',
'python-dateutil>=2.0',
diff --git a/src/mailman/__init__.py b/src/mailman/__init__.py
index 2d94288e0..1c760008d 100644
--- a/src/mailman/__init__.py
+++ b/src/mailman/__init__.py
@@ -37,3 +37,8 @@ if 'build_sphinx' not in sys.argv: # pragma: nocover
else:
from mailman.core.i18n import initialize
initialize()
+
+# Switch over to the internal importlib.resources module on Python 3.9+
+if sys.version_info >= (3, 9, 0):
+ import importlib.resources
+ sys.modules['importlib_resources'] = importlib.resources
diff --git a/src/mailman/testing/__init__.py b/src/mailman/testing/__init__.py
index e69de29bb..2b2ed536a 100644
--- a/src/mailman/testing/__init__.py
+++ b/src/mailman/testing/__init__.py
@@ -0,0 +1,23 @@
+# Copyright (C) 2009-2020 by the Free Software Foundation, Inc.
+#
+# This file is part of GNU Mailman.
+#
+# GNU Mailman is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option)
+# any later version.
+#
+# GNU Mailman is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# GNU Mailman. If not, see <https://www.gnu.org/licenses/>.
+
+import sys
+
+# Switch over to the internal importlib.resources module on Python 3.9+
+if sys.version_info >= (3, 9, 0):
+ import importlib.resources
+ sys.modules['importlib_resources'] = importlib.resources
--
GitLab

View File

@ -0,0 +1,60 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{9..11} )
inherit distutils-r1
DESCRIPTION="Mailman -- the GNU mailing list manager"
HOMEPAGE="https://www.list.org"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="GPL-3+"
SLOT="3"
KEYWORDS="~amd64"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="
>=dev-python/aiosmtpd-1.4.1[${PYTHON_USEDEP}]
dev-python/alembic[${PYTHON_USEDEP}]
dev-python/atpublic[${PYTHON_USEDEP}]
>=dev-python/authheaders-0.13.0[${PYTHON_USEDEP}]
>=dev-python/authres-1.0.1[${PYTHON_USEDEP}]
>=dev-python/click-8.0[${PYTHON_USEDEP}]
>=dev-python/dnspython-1.14.0[${PYTHON_USEDEP}]
>=dev-python/falcon-2.0.0[${PYTHON_USEDEP}]
dev-python/flufl-bounce[${PYTHON_USEDEP}]
>=dev-python/flufl-i18n-2.0.1[${PYTHON_USEDEP}]
>=dev-python/flufl-lock-3.1[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
dev-python/importlib_resources[${PYTHON_USEDEP}]
' python3_8)
www-servers/gunicorn[${PYTHON_USEDEP}]
dev-python/lazr-config[${PYTHON_USEDEP}]
>=dev-python/python-dateutil-2.0[${PYTHON_USEDEP}]
dev-python/passlib[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
>=dev-python/sqlalchemy-1.4[${PYTHON_USEDEP}]
dev-python/zope-component[${PYTHON_USEDEP}]
dev-python/zope-configuration[${PYTHON_USEDEP}]
dev-python/zope-event[${PYTHON_USEDEP}]
>=dev-python/zope-interface-5.0[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
dev-python/flufl-testing[${PYTHON_USEDEP}]
virtual/python-greenlet[${PYTHON_USEDEP}]
)
"
PATCHES=(
"${FILESDIR}/${P}-py3.9-importlib.patch"
"${FILESDIR}/${P}-fix-click-8.patch"
)
python_test() {
distutils_install_for_testing --via-venv
"${EPYTHON}" -m nose2 -vv || die "Tests failed with ${EPYTHON}"
}

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">mailman</remote-id>
<remote-id type="gitlab">mailman/mailman</remote-id>
</upstream>
</pkgmetadata>