From 8bfdc122fc20ebd9cf9c6192a1f490c4f7cfffe40bf438379f25ff03c08f832e Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 18 Nov 2021 13:03:17 +0000 Subject: [PATCH] Accepting request 931904 from home:gladiac:mailman3 - Update to version 1.2.0 * Update the authentication to call Hyperkitty using the API key as a part of Authorization HTTP header instead of url parameter. - Removed obsolete python-mailman-hyperkitty-reflect-changes-in-mailman-core.patch OBS-URL: https://build.opensuse.org/request/show/931904 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:mailman/python-mailman-hyperkitty?expand=0&rev=9 --- mailman-hyperkitty-1.1.0.tar.gz | 3 -- mailman-hyperkitty-1.2.0.tar.gz | 3 ++ ...itty-reflect-changes-in-mailman-core.patch | 45 ------------------- python-mailman-hyperkitty.changes | 8 ++++ python-mailman-hyperkitty.spec | 7 +-- 5 files changed, 13 insertions(+), 53 deletions(-) delete mode 100644 mailman-hyperkitty-1.1.0.tar.gz create mode 100644 mailman-hyperkitty-1.2.0.tar.gz delete mode 100644 python-mailman-hyperkitty-reflect-changes-in-mailman-core.patch diff --git a/mailman-hyperkitty-1.1.0.tar.gz b/mailman-hyperkitty-1.1.0.tar.gz deleted file mode 100644 index 5a73301..0000000 --- a/mailman-hyperkitty-1.1.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5dcec952c69fd42bfa25869a7dce662502cac5af1289e2c2d96dc3da5452d8d1 -size 20814 diff --git a/mailman-hyperkitty-1.2.0.tar.gz b/mailman-hyperkitty-1.2.0.tar.gz new file mode 100644 index 0000000..111ed31 --- /dev/null +++ b/mailman-hyperkitty-1.2.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:110071d4a5f7cff5afdd00073a2facfe284b3a3a62ba9210058c84e883db26da +size 21794 diff --git a/python-mailman-hyperkitty-reflect-changes-in-mailman-core.patch b/python-mailman-hyperkitty-reflect-changes-in-mailman-core.patch deleted file mode 100644 index a3175b0..0000000 --- a/python-mailman-hyperkitty-reflect-changes-in-mailman-core.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/mailman_hyperkitty/tests/test_archiver.py b/mailman_hyperkitty/tests/test_archiver.py -index 3d8896b6bb80eb3fe0b3aaa78c1eb3ac67076c5d..8430e3e3c0a943021707a2a34b4c700eb0a9a053 100644 ---- a/mailman_hyperkitty/tests/test_archiver.py -+++ b/mailman_hyperkitty/tests/test_archiver.py -@@ -102,10 +102,10 @@ class ArchiverTestCase(TestCase): - self.requests_patcher = patch("mailman_hyperkitty.requests") - self.requests = self.requests_patcher.start() - self.fake_response = None -- self.requests.get.side_effect = \ -- lambda url, *a, **kw: self.fake_response -- self.requests.post.side_effect = \ -- lambda url, *a, **kw: self.fake_response -+ self.requests.get.side_effect = ( -+ lambda url, *a, **kw: self.fake_response) -+ self.requests.post.side_effect = ( -+ lambda url, *a, **kw: self.fake_response) - - def tearDown(self): - self.requests_patcher.stop() -@@ -345,19 +345,14 @@ class ArchiverTestCase(TestCase): - self.archiver._switchboard.queue_directory)), 1) - self.assertEqual(len(self.archiver._switchboard.files), 1) - -- def test_archive_message_unserializable(self): -+ def test_archive_message_unserializable_raises_no_errors(self): -+ self.fake_response = FakeResponse(200, {"url": "dummy"}) - msg = self._get_msg() - msg["content-type"] = 'text/plain; charset="UTF-8"' - msg.set_payload(b"this contains encoded unicode \xc3\xa9 \xc3\xa0") -- # If you try to serialize this message to text, it will cause a: -- # KeyError: 'content-transfer-encoding' -+ # If you try to serialize this message to text, Mailman should be able -+ # to prevent KeyError by ignoring the bad-characters. - with patch("mailman_hyperkitty.logger") as logger: - self.archiver.archive_message(self.mlist, msg) -- # Check error log -- self.assertEqual(logger.error.call_count, 1) -- self.assertTrue(isinstance( -- logger.error.call_args_list[0][0][2], KeyError)) -- # Check that the message is not stored in the spool. -- self.assertEqual(len(os.listdir( -- self.archiver._switchboard.queue_directory)), 0) -- self.assertEqual(len(self.archiver._switchboard.files), 0) -+ # Check no errors in the log. -+ self.assertEqual(logger.error.call_count, 0) diff --git a/python-mailman-hyperkitty.changes b/python-mailman-hyperkitty.changes index 552fed7..7595fbb 100644 --- a/python-mailman-hyperkitty.changes +++ b/python-mailman-hyperkitty.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Nov 17 08:25:00 UTC 2021 - Andreas Schneider + +- Update to version 1.2.0 + * Update the authentication to call Hyperkitty using the API key as a part of + Authorization HTTP header instead of url parameter. +- Removed obsolete python-mailman-hyperkitty-reflect-changes-in-mailman-core.patch + ------------------------------------------------------------------- Tue May 4 09:36:18 UTC 2021 - Ben Greiner diff --git a/python-mailman-hyperkitty.spec b/python-mailman-hyperkitty.spec index 508f3a0..a99fe20 100644 --- a/python-mailman-hyperkitty.spec +++ b/python-mailman-hyperkitty.spec @@ -20,14 +20,12 @@ # mailman is built only for primary python3 flavor %define pythons python3 Name: python-mailman-hyperkitty -Version: 1.1.0 +Version: 1.2.0 Release: 0 Summary: Mailman archiver plugin for HyperKitty License: GPL-3.0-only URL: https://gitlab.com/mailman/mailman-hyperkitty/ Source: https://files.pythonhosted.org/packages/source/m/mailman-hyperkitty/mailman-hyperkitty-%{version}.tar.gz -# https://gitlab.com/mailman/mailman-hyperkitty/commit/84e05811fb71aa105fd85fd14399bff813ed744d -Patch0: python-mailman-hyperkitty-reflect-changes-in-mailman-core.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -55,8 +53,7 @@ Obsoletes: python38-mailman-hyperkitty < %{version}-%{release} Mailman archiver plugin for HyperKitty %prep -%setup -q -n mailman-hyperkitty-%{version} -%patch0 -p1 +%autosetup -n mailman-hyperkitty-%{version} -p1 %build %python_build