diff --git a/python-flufl.bounce.changes b/python-flufl.bounce.changes index f935552..f4485ef 100644 --- a/python-flufl.bounce.changes +++ b/python-flufl.bounce.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Feb 9 02:14:48 UTC 2024 - Steve Kowalik + +- Add patch use-correct-assertion-methods.patch: + * Use non-removed assertion methods. +- Switch to autosetup and pyproject macros. + ------------------------------------------------------------------- Tue Jun 13 16:09:34 UTC 2023 - Dirk Müller diff --git a/python-flufl.bounce.spec b/python-flufl.bounce.spec index 6e2f0a4..1f61cac 100644 --- a/python-flufl.bounce.spec +++ b/python-flufl.bounce.spec @@ -1,7 +1,7 @@ # # spec file for package python-flufl.bounce # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,7 +26,11 @@ URL: https://fluflbounce.readthedocs.io/en/latest/ # https://gitlab.com/warsaw/flufl.bounce/merge_requests/10 Source0: https://files.pythonhosted.org/packages/source/f/flufl.bounce/flufl.bounce-%{version}.tar.gz Source1: https://gitlab.com/warsaw/flufl.bounce/raw/master/LICENSE +# PATCH-FIX-UPSTREAM https://gitlab.com/warsaw/flufl.bounce/-/merge_requests/21 +Patch0: use-correct-assertion-methods.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: python-rpm-macros Requires: python-atpublic Requires: python-zope.interface @@ -43,14 +47,14 @@ BuildArch: noarch Email bounce detectors. %prep -%setup -q -n flufl.bounce-%{version} +%autosetup -p1 -n flufl.bounce-%{version} %build cp %{SOURCE1} . -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -62,6 +66,6 @@ cp %{SOURCE1} . %dir %{python_sitelib}/flufl %{python_sitelib}/flufl/bounce %{python_sitelib}/flufl.bounce-*.pth -%{python_sitelib}/flufl.bounce-%{version}*-info +%{python_sitelib}/flufl.bounce-%{version}.dist-info %changelog diff --git a/use-correct-assertion-methods.patch b/use-correct-assertion-methods.patch new file mode 100644 index 0000000..555c702 --- /dev/null +++ b/use-correct-assertion-methods.patch @@ -0,0 +1,53 @@ +From f1373c981a9a90a63ca95a814acf95f95a0c29ec Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= +Date: Wed, 21 Jun 2023 09:40:04 +0000 +Subject: [PATCH] Replace the usage of failIf unit test alias removed in Python + 3.12 with assertFalse + +--- + flufl/bounce/tests/test_detectors.py | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/flufl/bounce/tests/test_detectors.py b/flufl/bounce/tests/test_detectors.py +index 3838a55..4b31d23 100644 +--- a/flufl/bounce/tests/test_detectors.py ++++ b/flufl/bounce/tests/test_detectors.py +@@ -20,10 +20,10 @@ class TestOtherBounces(unittest.TestCase): + with closing(resource_stream('flufl.bounce.tests.data', + 'postfix_01.txt')) as fp: + msg = parse(fp) +- self.failIf(msg['x-mailer'] is not None) ++ self.assertFalse(msg['x-mailer'] is not None) + temporary, permanent = SMTP32().process(msg) +- self.failIf(temporary) +- self.failIf(permanent) ++ self.assertFalse(temporary) ++ self.assertFalse(permanent) + + def test_caiwireless(self): + # BAW: this is a mostly bogus test; I lost the samples. :( +@@ -36,8 +36,8 @@ Content-Type: multipart/report; boundary=BOUNDARY + + """) + temporary, permanent = Caiwireless().process(msg) +- self.failIf(temporary) +- self.failIf(permanent) ++ self.assertFalse(temporary) ++ self.assertFalse(permanent) + + def test_microsoft(self): + # BAW: similarly as above, I lost the samples. :( +@@ -50,8 +50,8 @@ Content-Type: multipart/report; boundary=BOUNDARY + + """) + temporary, permanent = Microsoft().process(msg) +- self.failIf(temporary) +- self.failIf(permanent) ++ self.assertFalse(temporary) ++ self.assertFalse(permanent) + + def test_caiwireless_lp_917720(self): + # https://bugs.launchpad.net/flufl.bounce/+bug/917720 +-- +GitLab +