#3 NUR and deps/patches updates + importlib.resources
Closed 4 years ago by churchyard. Opened 4 years ago by churchyard.
rpms/ churchyard/mailman3 fix_build  into  master

file modified
+1
@@ -1,1 +1,2 @@ 

  /mailman-3.2.0.tar.gz

+ /mailman-3.2.2.tar.gz

@@ -1,5 +1,5 @@ 

  diff --git a/src/mailman/app/bounces.py b/src/mailman/app/bounces.py

- index e3d923946..2ebb6dd4b 100644

+ index 4736f0f7c..030f6926a 100644

  --- a/src/mailman/app/bounces.py

  +++ b/src/mailman/app/bounces.py

  @@ -77,7 +77,7 @@ def bounce_message(mlist, msg, error=None):
@@ -122,7 +122,7 @@ 

       ...

       Gwen Person <gwen@example.com> has been removed from A Test List.

  diff --git a/src/mailman/app/moderator.py b/src/mailman/app/moderator.py

- index 43763e248..9a809d620 100644

+ index 558108a6b..3a2ce2710 100644

  --- a/src/mailman/app/moderator.py

  +++ b/src/mailman/app/moderator.py

  @@ -24,7 +24,7 @@ from email.utils import formatdate, getaddresses, make_msgid
@@ -165,7 +165,7 @@ 

   

   

  diff --git a/src/mailman/app/notifications.py b/src/mailman/app/notifications.py

- index 4a7bd16fb..1a3b82b46 100644

+ index 8470335c2..7ff0f8581 100644

  --- a/src/mailman/app/notifications.py

  +++ b/src/mailman/app/notifications.py

  @@ -68,7 +68,7 @@ def send_welcome_message(mlist, member, language, text=''):
@@ -187,7 +187,7 @@ 

   

   

  diff --git a/src/mailman/app/subscriptions.py b/src/mailman/app/subscriptions.py

- index 6353eee70..e192485ad 100644

+ index 71efe217f..2e5a29e59 100644

  --- a/src/mailman/app/subscriptions.py

  +++ b/src/mailman/app/subscriptions.py

  @@ -27,7 +27,7 @@ from mailman.app.membership import delete_member
@@ -233,7 +233,7 @@ 

   

   

  diff --git a/src/mailman/app/tests/test_moderation.py b/src/mailman/app/tests/test_moderation.py

- index c95f5ae9d..8fb216861 100644

+ index 4c3d2a9a8..a1d8a9b4c 100644

  --- a/src/mailman/app/tests/test_moderation.py

  +++ b/src/mailman/app/tests/test_moderation.py

  @@ -160,6 +160,8 @@ class TestUnsubscription(unittest.TestCase):
@@ -255,7 +255,7 @@ 

               item.msg['subject'],

               'New unsubscription request from Test by anne@example.org')

  diff --git a/src/mailman/app/tests/test_subscriptions.py b/src/mailman/app/tests/test_subscriptions.py

- index b75c68542..468b5c487 100644

+ index ba861ec13..6e19ed12c 100644

  --- a/src/mailman/app/tests/test_subscriptions.py

  +++ b/src/mailman/app/tests/test_subscriptions.py

  @@ -439,6 +439,8 @@ class TestSubscriptionWorkflow(unittest.TestCase):
@@ -280,7 +280,7 @@ 

           self.assertEqual(

               message['Subject'],

  diff --git a/src/mailman/app/tests/test_unsubscriptions.py b/src/mailman/app/tests/test_unsubscriptions.py

- index dbd4cbe14..92175b090 100644

+ index a458ab5e5..0ea488565 100644

  --- a/src/mailman/app/tests/test_unsubscriptions.py

  +++ b/src/mailman/app/tests/test_unsubscriptions.py

  @@ -23,6 +23,7 @@ from contextlib import suppress
@@ -311,7 +311,7 @@ 

           self.assertEqual(

               message['Subject'],

  diff --git a/src/mailman/chains/hold.py b/src/mailman/chains/hold.py

- index fec0303b0..6d1f89a98 100644

+ index 6240e5a85..f6671e091 100644

  --- a/src/mailman/chains/hold.py

  +++ b/src/mailman/chains/hold.py

  @@ -27,7 +27,7 @@ from mailman.app.replybot import can_acknowledge
@@ -354,7 +354,7 @@ 

                   template = getUtility(ITemplateLoader).get(

                       'list:admin:action:post', mlist)

  diff --git a/src/mailman/chains/tests/test_hold.py b/src/mailman/chains/tests/test_hold.py

- index a780585a3..900c24e52 100644

+ index 23cbde1c7..f7297d1d4 100644

  --- a/src/mailman/chains/tests/test_hold.py

  +++ b/src/mailman/chains/tests/test_hold.py

  @@ -79,6 +79,8 @@ Content-Transfer-Encoding: 7bit
@@ -381,10 +381,10 @@ 

           self._mlist.subscribe(address, MemberRole.moderator)

  +        owner = getUtility(IUserManager).create_address('owner@example.com')

  +        self._mlist.subscribe(owner, MemberRole.owner)

-          path = resource_filename('mailman.chains.tests', 'issue144.eml')

-          with open(path, 'rb') as fp:

-              msg = mfb(fp.read())

- @@ -182,10 +188,11 @@ A message body.

+          msg = mfb(read_binary('mailman.chains.tests', 'issue144.eml'))

+          msg.sender = 'anne@example.com'

+          process_chain(self._mlist, msg, {}, start_chain='hold')

+ @@ -180,10 +186,11 @@ A message body.

           # delivery to the moderators.

           items = get_queue_messages('virgin', expected_count=1)

           msgdata = items[0].msgdata
@@ -399,7 +399,7 @@ 

           for line in msg.get_payload(0).get_payload().splitlines():

               if line.strip().startswith('Subject:'):

  diff --git a/src/mailman/commands/cli_lists.py b/src/mailman/commands/cli_lists.py

- index f8fa8d800..9ba3c85e9 100644

+ index 97090a2fc..1021476ce 100644

  --- a/src/mailman/commands/cli_lists.py

  +++ b/src/mailman/commands/cli_lists.py

  @@ -24,7 +24,7 @@ from mailman.app.lifecycle import create_list, remove_list
@@ -426,10 +426,10 @@ 

   

   

  diff --git a/src/mailman/commands/docs/create.rst b/src/mailman/commands/docs/create.rst

- index c80ff7a3d..a7855a557 100644

+ index d619302e5..a6000c754 100644

  --- a/src/mailman/commands/docs/create.rst

  +++ b/src/mailman/commands/docs/create.rst

- @@ -128,7 +128,8 @@ The notification message is in the virgin queue.

+ @@ -130,7 +130,8 @@ The notification message is in the virgin queue.

       ...

       Subject: Your new mailing list: fly@example.com

       From: noreply@example.com
@@ -454,7 +454,7 @@ 

       MIME-Version: 1.0

       ...

  diff --git a/src/mailman/email/message.py b/src/mailman/email/message.py

- index cdf5869c8..6b26ac749 100644

+ index 3ab348b64..05bf2dd67 100644

  --- a/src/mailman/email/message.py

  +++ b/src/mailman/email/message.py

  @@ -31,6 +31,7 @@ from email.header import Header
@@ -508,7 +508,7 @@ 

           del self['to']

           self['To'] = to

  diff --git a/src/mailman/handlers/acknowledge.py b/src/mailman/handlers/acknowledge.py

- index a8d8781fd..3e7032dcf 100644

+ index 92e18c6cd..edd96e9e8 100644

  --- a/src/mailman/handlers/acknowledge.py

  +++ b/src/mailman/handlers/acknowledge.py

  @@ -74,5 +74,5 @@ class Acknowledge:
@@ -555,7 +555,7 @@ 

       X-Ack: No

       Message-ID: <...>

  diff --git a/src/mailman/handlers/replybot.py b/src/mailman/handlers/replybot.py

- index 62ceed8f5..5f918a2d9 100644

+ index ab22849a2..44cfccbd4 100644

  --- a/src/mailman/handlers/replybot.py

  +++ b/src/mailman/handlers/replybot.py

  @@ -105,8 +105,9 @@ class Replybot:
@@ -571,7 +571,7 @@ 

           # prevent recursions and mail loops!

           outmsg['X-Ack'] = 'No'

  diff --git a/src/mailman/handlers/rfc_2369.py b/src/mailman/handlers/rfc_2369.py

- index 63daab2f2..9ce0f51ba 100644

+ index b858d1c72..d8b14158c 100644

  --- a/src/mailman/handlers/rfc_2369.py

  +++ b/src/mailman/handlers/rfc_2369.py

  @@ -19,12 +19,11 @@
@@ -609,10 +609,10 @@ 

       # "X-List-Administrivia: yes" header.  For all others (i.e. those coming

       # from list posts), we add a bunch of other RFC 2369 headers.

  diff --git a/src/mailman/runners/command.py b/src/mailman/runners/command.py

- index e885b217d..4a4e71113 100644

+ index d7cc1dcc7..2d8b2fa15 100644

  --- a/src/mailman/runners/command.py

  +++ b/src/mailman/runners/command.py

- @@ -223,7 +223,7 @@ class CommandRunner(Runner):

+ @@ -231,7 +231,7 @@ class CommandRunner(Runner):

           language = getUtility(ILanguageManager)[msgdata['lang']]

           reply = UserNotification(msg.sender, mlist.bounces_address,

                                    _('The results of your email commands'),
@@ -622,7 +622,7 @@ 

           if cte is not None:

               reply['Content-Transfer-Encoding'] = cte

  diff --git a/src/mailman/runners/digest.py b/src/mailman/runners/digest.py

- index dc5f65cbe..9bd636fc8 100644

+ index 2e0af2a1b..0518e4254 100644

  --- a/src/mailman/runners/digest.py

  +++ b/src/mailman/runners/digest.py

  @@ -34,6 +34,7 @@ from mailman.email.message import Message, MultipartDigestMessage
@@ -642,7 +642,7 @@ 

           # plus any digest header.  In the MIME digests, the masthead and

           # digest header are separate MIME subobjects.  In either case, it's

  diff --git a/src/mailman/runners/tests/test_digest.py b/src/mailman/runners/tests/test_digest.py

- index 251e9cb02..8c1e0ebf1 100644

+ index 2f59ebc46..7021bdb45 100644

  --- a/src/mailman/runners/tests/test_digest.py

  +++ b/src/mailman/runners/tests/test_digest.py

  @@ -66,6 +66,7 @@ class TestDigest(unittest.TestCase):
@@ -654,7 +654,7 @@ 

       def test_simple_message(self):

           # Subscribe some users receiving digests.

  diff --git a/src/mailman/utilities/email.py b/src/mailman/utilities/email.py

- index 81c2cb1fb..c8da62269 100644

+ index ce42fa37c..fb00dc163 100644

  --- a/src/mailman/utilities/email.py

  +++ b/src/mailman/utilities/email.py

  @@ -18,7 +18,9 @@
@@ -685,7 +685,7 @@ 

  +        listid_h = '<{}>'.format(list_id)

  +    return listid_h

  diff --git a/src/mailman/utilities/tests/test_email.py b/src/mailman/utilities/tests/test_email.py

- index b14b23306..3e3afde40 100644

+ index 1f9420e49..3129f01dc 100644

  --- a/src/mailman/utilities/tests/test_email.py

  +++ b/src/mailman/utilities/tests/test_email.py

  @@ -19,11 +19,12 @@

@@ -1,5 +1,5 @@ 

  diff --git a/src/mailman/handlers/subject_prefix.py b/src/mailman/handlers/subject_prefix.py

- index ac76724a3..58e01a41b 100644

+ index 3074f4848..0f58fe0eb 100644

  --- a/src/mailman/handlers/subject_prefix.py

  +++ b/src/mailman/handlers/subject_prefix.py

  @@ -39,13 +39,12 @@ def ascii_header(mlist, msgdata, subject, prefix, prefix_pattern, ws):
@@ -17,7 +17,7 @@ 

       msgdata['stripped_subject'] = subject_text

       rematch = re.match(RE_PATTERN, subject_text, re.I)

       if rematch:

- @@ -80,13 +79,12 @@ def all_same_charset(mlist, msgdata, subject, prefix, prefix_pattern, ws):

+ @@ -83,13 +82,12 @@ def all_same_charset(mlist, msgdata, subject, prefix, prefix_pattern, ws):

           if charset != list_charset:

               return None

       subject_text = EMPTYSTRING.join(chunks)
@@ -33,7 +33,7 @@ 

       msgdata['stripped_subject'] = subject_text

       rematch = re.match(RE_PATTERN, subject_text, re.I)

       if rematch:

- @@ -108,7 +106,7 @@ def mixed_charsets(mlist, msgdata, subject, prefix, prefix_pattern, ws):

+ @@ -114,7 +112,7 @@ def mixed_charsets(mlist, msgdata, subject, prefix, prefix_pattern, ws):

       list_charset = mlist.preferred_language.charset

       chunks = decode_header(subject.encode())

       if len(chunks) == 0:
@@ -42,7 +42,7 @@ 

               subject_text = _('(no subject)')

           chunks = [(prefix, list_charset),

                     (subject_text, list_charset),

- @@ -128,13 +126,20 @@ def mixed_charsets(mlist, msgdata, subject, prefix, prefix_pattern, ws):

+ @@ -134,13 +132,20 @@ def mixed_charsets(mlist, msgdata, subject, prefix, prefix_pattern, ws):

               chunks.insert(0, ('', 'us-ascii'))

               first_text = ''

       first_text = re.sub(prefix_pattern, '', first_text).lstrip()
@@ -65,7 +65,7 @@ 

   

   

  diff --git a/src/mailman/handlers/tests/test_subject_prefix.py b/src/mailman/handlers/tests/test_subject_prefix.py

- index 38ae6e7e2..b9341c293 100644

+ index 8a880be8b..2efc4ccf4 100644

  --- a/src/mailman/handlers/tests/test_subject_prefix.py

  +++ b/src/mailman/handlers/tests/test_subject_prefix.py

  @@ -33,6 +33,13 @@ class TestSubjectPrefix(unittest.TestCase):
@@ -82,7 +82,7 @@ 

   

       def test_isdigest(self):

           # If the message is destined for the digest, the Subject header does

- @@ -97,6 +104,14 @@ class TestSubjectPrefix(unittest.TestCase):

+ @@ -114,6 +121,14 @@ class TestSubjectPrefix(unittest.TestCase):

           self._process(self._mlist, msg, {})

           self.assertEqual(str(msg['subject']), '[Test]  A test message')

   
@@ -97,7 +97,7 @@ 

       def test_i18n_prefix(self):

           # The Subject header is encoded, but the prefix is still added.

           msg = Message()

- @@ -127,15 +142,13 @@ class TestSubjectPrefix(unittest.TestCase):

+ @@ -198,15 +213,13 @@ class TestSubjectPrefix(unittest.TestCase):

       def test_decode_header_returns_string(self):

           # Under some circumstances, email.header.decode_header() returns a

           # string value.  Ensure we can handle that.
@@ -114,7 +114,7 @@ 

   

       def test_unknown_encoded_subject(self):

           msg = Message()

- @@ -144,3 +157,59 @@ class TestSubjectPrefix(unittest.TestCase):

+ @@ -215,3 +228,59 @@ class TestSubjectPrefix(unittest.TestCase):

           subject = msg['subject']

           self.assertEqual(str(subject),

                            '[Test]  Non-ascii subject - fran�ais')

@@ -0,0 +1,31 @@ 

+ diff --git a/src/mailman/handlers/tests/test_subject_prefix.py b/src/mailman/handlers/tests/test_subject_prefix.py

+ index 8a880be8b..ef2fc171a 100644

+ --- a/src/mailman/handlers/tests/test_subject_prefix.py

+ +++ b/src/mailman/handlers/tests/test_subject_prefix.py

+ @@ -130,7 +130,7 @@ class TestSubjectPrefix(unittest.TestCase):

+          msg['Subject'] = '[Test] '

+          self._process(self._mlist, msg, {})

+          subject = msg['subject']

+ -        self.assertEqual(str(subject), '[Test] ')

+ +        self.assertEqual(str(subject), '[Test] (no subject)')

+  

+      def test_prefix_only_all_same(self):

+          # Incoming subject is only the prefix.

+ @@ -141,7 +141,7 @@ class TestSubjectPrefix(unittest.TestCase):

+          self._process(self._mlist, msg, {})

+          self._mlist.preferred_language.charset = old_charset

+          subject = msg['subject']

+ -        self.assertEqual(str(subject), '[Test] ')

+ +        self.assertEqual(str(subject), '[Test] (no subject)')

+  

+      def test_prefix_only_mixed(self):

+          # Incoming subject is only the prefix.

+ @@ -149,7 +149,7 @@ class TestSubjectPrefix(unittest.TestCase):

+          msg['Subject'] = '=?utf-8?Q?[Test]_?='

+          self._process(self._mlist, msg, {})

+          subject = msg['subject']

+ -        self.assertEqual(str(subject), '[Test] ')

+ +        self.assertEqual(str(subject), '[Test] (no subject)')

+  

+      def test_re_only(self):

+          # Incoming subject is only Re:.

@@ -0,0 +1,262 @@ 

+ commit ac8852b07 (HEAD -> duck-patches)

+ Author: Mark Sapiro <mark@msapiro.net>

+ Date:   Sun Apr 28 08:14:18 2019 -0700

+ 

+     Fix failing tests. (ported for 3.2.2)

+     

+     Possibly the code should change so the original tests don't fail,

+     but this allows the tests to pass.

+ 

+ diff --git a/src/mailman/rest/docs/addresses.rst b/src/mailman/rest/docs/addresses.rst

+ index eac4826bf..39e9f38c6 100644

+ --- a/src/mailman/rest/docs/addresses.rst

+ +++ b/src/mailman/rest/docs/addresses.rst

+ @@ -146,7 +146,7 @@ sub-resource of the address.  If the user does not exist, it will be created.

+      >>> dump_json('http://localhost:9001/3.0/addresses/cris@example.com/user',

+      ...           {'display_name': 'Cris X. Person'})

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/users/1

+      server: ...

+ @@ -223,7 +223,7 @@ POST request.

+      >>> dump_json('http://localhost:9001/3.0/addresses/cris@example.com/user',

+      ...           {'user_id': 1})

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      server: ...

+      status: 200

+ @@ -243,7 +243,7 @@ followed by a POST request, or you can send a PUT request.

+      >>> dump_json('http://localhost:9001/3.0/addresses/cris@example.com/user',

+      ...           {'display_name': 'Cris Q Person'}, method="PUT")

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/users/2

+      server: ...

+ @@ -297,7 +297,7 @@ addresses to an existing user.

+      ...           'email': 'dave.person@example.org'

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/addresses/dave.person@example.org

+      server: ...

+ @@ -311,7 +311,7 @@ When you add the new address, you can give it an optional display name.

+      ...           'display_name': 'Davie P',

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/addresses/dp@example.org

+      server: ...

+ diff --git a/src/mailman/rest/docs/domains.rst b/src/mailman/rest/docs/domains.rst

+ index 994d2d935..0cb35d46f 100644

+ --- a/src/mailman/rest/docs/domains.rst

+ +++ b/src/mailman/rest/docs/domains.rst

+ @@ -114,7 +114,7 @@ example.com domain does not contain any mailing lists.

+      ...           'fqdn_listname': 'test-domains@example.com',

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/lists/test-domains.example.com

+      ...

+ @@ -150,7 +150,7 @@ New domains can be created by posting to the ``domains`` url.

+      ...           'mail_host': 'lists.example.com',

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/domains/lists.example.com

+      ...

+ @@ -181,7 +181,7 @@ You can also create a new domain with a description and a contact address.

+      ...           'description': 'My new domain',

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/domains/my.example.com

+      ...

+ @@ -276,7 +276,7 @@ New domains can be created with owners.

+      ...           ('owner', 'bart@example.com'),

+      ...           ))

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/domains/your.example.com

+      server: ...

+ diff --git a/src/mailman/rest/docs/lists.rst b/src/mailman/rest/docs/lists.rst

+ index ced1a4946..8739eadd1 100644

+ --- a/src/mailman/rest/docs/lists.rst

+ +++ b/src/mailman/rest/docs/lists.rst

+ @@ -194,7 +194,7 @@ New mailing lists can also be created through the API, by posting to the

+      ...           'fqdn_listname': 'bee@example.com',

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/lists/bee.example.com

+      ...

+ @@ -275,7 +275,7 @@ different style.

+      ...           'style_name': 'legacy-announce',

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/lists/cat.example.com

+      ...

+ @@ -434,7 +434,7 @@ can force the digest to be sent.

+      ...           'send': True,

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+  

+  Once the runner does its thing, the digest message will be sent.

+ @@ -483,7 +483,7 @@ Let's bump the digest.

+      ...           'bump': True,

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+  

+  And now the next digest to be sent will have a new volume number.

+ diff --git a/src/mailman/rest/docs/membership.rst b/src/mailman/rest/docs/membership.rst

+ index 23664f346..e9b677337 100644

+ --- a/src/mailman/rest/docs/membership.rst

+ +++ b/src/mailman/rest/docs/membership.rst

+ @@ -318,7 +318,7 @@ mailing list.

+      ...           'role': 'moderator',

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/members/6

+      server: ...

+ @@ -330,7 +330,7 @@ mailing list.

+      ...           'role': 'owner',

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/members/7

+      server: ...

+ @@ -682,7 +682,7 @@ won't have to approve her subscription request.

+      ...           'pre_approved': True,

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/members/8

+      server: ...

+ @@ -740,7 +740,7 @@ list with her preferred address.

+      ...     'pre_approved': True,

+      ...     })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/members/9

+      server: ...

+ diff --git a/src/mailman/rest/docs/queues.rst b/src/mailman/rest/docs/queues.rst

+ index 15f092113..531a4b5f9 100644

+ --- a/src/mailman/rest/docs/queues.rst

+ +++ b/src/mailman/rest/docs/queues.rst

+ @@ -118,7 +118,7 @@ existing mailing list.

+      ...     'fqdn_listname': 'ant@example.com',

+      ...     })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/lists/ant.example.com

+      server: WSGIServer/0.2 CPython/...

+ @@ -136,7 +136,7 @@ requires a List ID.

+      ...

+      ... """})

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/queues/bad/...

+      server: ...

+ diff --git a/src/mailman/rest/docs/users.rst b/src/mailman/rest/docs/users.rst

+ index 76251d258..5fec84b11 100644

+ --- a/src/mailman/rest/docs/users.rst

+ +++ b/src/mailman/rest/docs/users.rst

+ @@ -108,7 +108,7 @@ the user's email address must be provided.

+      ...           'email': 'cris@example.com',

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/users/3

+      server: ...

+ @@ -155,7 +155,7 @@ When a user is added, a display name can be provided.

+      ...           'display_name': 'Dave Person',

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/users/4

+      server: ...

+ @@ -188,7 +188,7 @@ before being stored.

+      ...           'password': 'supersekrit',

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/users/5

+      server: ...

+ @@ -486,7 +486,7 @@ Gwen, a new users, takes over as a server owner.

+      ...           'is_server_owner': True,

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/users/7

+      server: ...

+ @@ -523,7 +523,7 @@ Now, a user creation request is received, using Herb's email address.

+      ...           'display_name': 'Herb Person',

+      ...           })

+      content-length: 0

+ -    content-type: application/json; charset=UTF-8

+ +    content-type: application/json

+      date: ...

+      location: http://localhost:9001/3.0/users/8

+      server: ...

+ diff --git a/src/mailman/rest/tests/test_wsgiapp.py b/src/mailman/rest/tests/test_wsgiapp.py

+ index 3055cc6f1..83da1d257 100644

+ --- a/src/mailman/rest/tests/test_wsgiapp.py

+ +++ b/src/mailman/rest/tests/test_wsgiapp.py

+ @@ -90,7 +90,7 @@ class TestSupportedContentType(unittest.TestCase):

+              )

+          self.assertEqual(response.status_code, 400)

+          self.assertEqual(response.headers.get('content-type', None),

+ -                         'application/json; charset=UTF-8')

+ +                         'application/json')

+          self.assertEqual(response.json(),

+                           {'title': '400 Bad Request'})

+          # Now, let's try to call somewhere mailman.rest.helpers.bad_request()

file modified
+32 -28
@@ -19,8 +19,8 @@ 

  

  

  Name:           mailman3

- Version:        3.2.0

- Release:        6%{?dist}

+ Version:        3.2.2

+ Release:        1%{?dist}

  Summary:        The GNU mailing list manager

  

  License:        GPLv3
@@ -37,13 +37,8 @@ 

  Patch10:        %{name}-administrivia-headers.patch

  # <https://gitlab.com/mailman/mailman/merge_requests/70>

  Patch11:        %{name}-subject-prefix.patch

- # Compatibility with click>=7.0

- # https://gitlab.com/mailman/mailman/merge_requests/417

- Patch12:        %{name}-click7.patch

- # Compatibility with Python 3.7

- # https://gitlab.com/mailman/mailman/commit/2dd2dc7ed2dfabbac029d3ec830004ff25c32340

- Patch13:        %{name}-py37.patch

- 

+ Patch12:        %{name}-subject-prefix_tests.patch

+ Patch13:        %{name}-tests-content-type-fix.patch

  

  BuildArch:      noarch

  
@@ -53,10 +48,10 @@ 

  %if %{undefined python_enable_dependency_generator}

  Requires:       python%{python3_pkgversion} >= 3.5

  Requires:       python%{python3_pkgversion}-setuptools

- Requires:       python%{python3_pkgversion}-aiosmtpd

+ Requires:       python%{python3_pkgversion}-aiosmtpd >= 1.1

  Requires:       python%{python3_pkgversion}-alembic

  Requires:       python%{python3_pkgversion}-atpublic

- Requires:       python%{python3_pkgversion}-click

+ Requires:       python%{python3_pkgversion}-click >= 7.0

  Requires:       python%{python3_pkgversion}-dns >= 1.14.0

  Requires:       python%{python3_pkgversion}-falcon >= 1.0.0

  Requires:       python%{python3_pkgversion}-flufl-bounce
@@ -67,8 +62,7 @@ 

  # mailman/utilities/passwords.py", line 43: 'CryptContext' has no attribute 'from_string'

  Requires:       python%{python3_pkgversion}-passlib >= 1.6.0

  Requires:       python%{python3_pkgversion}-requests

- # Uses the Query.one_or_none() method introduced in SQLAlchemy 1.0.9

- Requires:       python%{python3_pkgversion}-sqlalchemy >= 1.0.9

+ Requires:       python%{python3_pkgversion}-sqlalchemy >= 1.2.3

  Requires:       python%{python3_pkgversion}-zope-component

  Requires:       python%{python3_pkgversion}-zope-configuration

  Requires:       python%{python3_pkgversion}-zope-event
@@ -76,15 +70,15 @@ 

  %endif

  

  # To run the test suite:

- BuildRequires:  python%{python3_pkgversion}-aiosmtpd

+ BuildRequires:  python%{python3_pkgversion}-aiosmtpd >= 1.1

  BuildRequires:  python%{python3_pkgversion}-alembic

  BuildRequires:  python%{python3_pkgversion}-atpublic

- BuildRequires:  python%{python3_pkgversion}-click

+ BuildRequires:  python%{python3_pkgversion}-click >= 7.0

  BuildRequires:  python%{python3_pkgversion}-dns >= 1.14.0

  BuildRequires:  python%{python3_pkgversion}-falcon >= 1.0.0

  BuildRequires:  python%{python3_pkgversion}-flufl-bounce

- BuildRequires:  python%{python3_pkgversion}-flufl-i18n

- BuildRequires:  python%{python3_pkgversion}-flufl-lock

+ BuildRequires:  python%{python3_pkgversion}-flufl-i18n >= 2.0.1

+ BuildRequires:  python%{python3_pkgversion}-flufl-lock >= 3.1

  BuildRequires:  python%{python3_pkgversion}-flufl-testing

  BuildRequires:  python%{python3_pkgversion}-lazr-config

  BuildRequires:  python%{python3_pkgversion}-lazr-smtptest
@@ -93,8 +87,7 @@ 

  BuildRequires:  python%{python3_pkgversion}-passlib >= 1.6.0

  BuildRequires:  python%{python3_pkgversion}-psycopg2

  BuildRequires:  python%{python3_pkgversion}-requests

- # Uses the Query.one_or_none() method introduced in SQLAlchemy 1.0.9

- BuildRequires:  python%{python3_pkgversion}-sqlalchemy >= 1.0.9

+ BuildRequires:  python%{python3_pkgversion}-sqlalchemy >= 1.2.3

  BuildRequires:  python%{python3_pkgversion}-zope-component

  BuildRequires:  python%{python3_pkgversion}-zope-configuration

  BuildRequires:  python%{python3_pkgversion}-zope-event
@@ -118,7 +111,7 @@ 

  %endif

  # SELinux https://fedoraproject.org/wiki/SELinux_Policy_Modules_Packaging_Draft

  BuildRequires:  checkpolicy, selinux-policy-devel

- BuildRequires:  util-linux

+ BuildRequires:  hardlink

  

  # Scriptlets

  %{?systemd_requires}
@@ -134,13 +127,7 @@ 

  

  

  %prep

- %setup -q -n %{pypi_name}-%{version}

- %patch10 -p1

- %patch11 -p1

- %if 0%{?fedora} && 0%{?fedora} > 28

- %patch12 -p1

- %patch13 -p1

- %endif

+ %autosetup -p1 -n %{pypi_name}-%{version}

  

  # SELinux

  mkdir SELinux
@@ -151,6 +138,10 @@ 

  policy_module(%{name}, 1.4)

  EOF

  

+ # importlib.resources is part of the standard library since Python 3.7

+ sed -i '/importlib_resources/d' setup.py

+ sed -i 's/importlib_resources/importlib.resources/' $(grep -Rl importlib_resources)

+ 

  

  %build

  %py3_build
@@ -205,10 +196,13 @@ 

    install -p -m 644 SELinux/%{name}.pp.${selinuxvariant} \

      %{buildroot}%{_datadir}/selinux/${selinuxvariant}/%{name}.pp

  done

- /usr/bin/hardlink -cv %{buildroot}%{_datadir}/selinux

+ hardlink -cv %{buildroot}%{_datadir}/selinux

  

  

  %check

+ # tests need a proper locale

+ export LANG=en_US.UTF-8

+ export LC_ALL=en_US.UTF-8

  # Mailman3 can only be tested when its installed (it starts runners and won't

  # find the buildroot), so we use a venv

  %{__python3} -m venv --system-site-packages --without-pip --clear venv
@@ -282,6 +276,16 @@ 

  

  

  %changelog

+ * Wed Jan 30 2020 Marc Dequènes (Duck) <duck@redhat.com> - 3.2.2-1

+ - NUR

+ - remove Python 3.7 support patch, applied upstream

+ - refreshed/adapted patches

+ - don't hardcode the path to `hardlink`

+ - update and tighten dependencies

+ - adapt tests after changes in mailman3-subject-prefix.patch

+ - backport content-type fix for tests

+ - use importlib.resources from the standard library over importlib_resources backport

+ 

  * Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-6

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (mailman-3.2.0.tar.gz) = ca68a6e5d10b59e7bd4508f006589a0459d69860f7261c48929f1ca86da54161907d3b2d9b4d7e61b15d854f676d55db9e353269123d43a370eb3c056ea78c09

+ SHA512 (mailman-3.2.2.tar.gz) = b6c8353ae3b902093267854c8d16e06b2aebb8f030b2371f530ac21ca0249b89188cec82145eaa777f29a9b5d9eca758d670d272d776236a2ca144e2de1f3b4f