python-mailman/support-click-8-0.patch
Steve Kowalik 0b0ec08568 - Add support-click-8-0.patch:
* Lightly rebased from upstream to support click 8.0
- Add support-sqlalchemy-1-4.patch:
  * Support running with SQLAlchemy 1.4

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:mailman/python-mailman?expand=0&rev=49
2021-07-21 01:52:20 +00:00

105 lines
5.0 KiB
Diff

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.
---
setup.py | 2 +-
src/mailman/commands/docs/import.rst | 1 +
src/mailman/commands/tests/test_cli_addmembers.py | 8 ++++----
src/mailman/commands/tests/test_cli_delmembers.py | 4 ++--
src/mailman/commands/tests/test_cli_syncmembers.py | 8 ++++----
5 files changed, 12 insertions(+), 11 deletions(-)
Index: mailman-3.3.4/setup.py
===================================================================
--- mailman-3.3.4.orig/setup.py
+++ mailman-3.3.4/setup.py
@@ -115,7 +115,7 @@ case second 'm'. Any other spelling is
'atpublic',
'authheaders>=0.9.2',
'authres>=1.0.1',
- 'click>=7.0.0',
+ 'click>=8.0.0',
'dnspython>=1.14.0',
'falcon>1.0.0',
'flufl.bounce',
Index: mailman-3.3.4/src/mailman/commands/docs/import.rst
===================================================================
--- mailman-3.3.4.orig/src/mailman/commands/docs/import.rst
+++ mailman-3.3.4/src/mailman/commands/docs/import.rst
@@ -58,5 +58,6 @@ import, the mailing list's "real name" w
Import
>>> command('mailman import21 import@example.com ' + pickle_file)
+ Importing ...
>>> print(mlist.display_name)
Test
Index: mailman-3.3.4/src/mailman/commands/tests/test_cli_addmembers.py
===================================================================
--- mailman-3.3.4.orig/src/mailman/commands/tests/test_cli_addmembers.py
+++ mailman-3.3.4/src/mailman/commands/tests/test_cli_addmembers.py
@@ -57,8 +57,8 @@ class TestCLIAddMembers(unittest.TestCas
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.TestCas
'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:
Index: mailman-3.3.4/src/mailman/commands/tests/test_cli_delmembers.py
===================================================================
--- mailman-3.3.4.orig/src/mailman/commands/tests/test_cli_delmembers.py
+++ mailman-3.3.4/src/mailman/commands/tests/test_cli_delmembers.py
@@ -56,8 +56,8 @@ class TestCLIDelMembers(unittest.TestCas
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:
Index: mailman-3.3.4/src/mailman/commands/tests/test_cli_syncmembers.py
===================================================================
--- mailman-3.3.4.orig/src/mailman/commands/tests/test_cli_syncmembers.py
+++ mailman-3.3.4/src/mailman/commands/tests/test_cli_syncmembers.py
@@ -58,8 +58,8 @@ class TestCLISyncMembers(unittest.TestCa
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.TestCa
'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