summaryrefslogtreecommitdiff
path: root/net-mail/mailman/files/mailman-3.3.4-fix-click-8.patch
blob: c5f5d774fdaa8dff47ccd264d8bd83bdf3d1ae0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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