Accepting request 1145318 from devel:languages:python
- Add patch use-correct-assertion-methods.patch: * Use non-removed assertion methods. - Switch to autosetup and pyproject macros. OBS-URL: https://build.opensuse.org/request/show/1145318 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-flufl.bounce?expand=0&rev=7
This commit is contained in:
commit
c4a07c915b
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 9 02:14:48 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- 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 <dmueller@suse.com>
|
Tue Jun 13 16:09:34 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-flufl.bounce
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# 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
|
# https://gitlab.com/warsaw/flufl.bounce/merge_requests/10
|
||||||
Source0: https://files.pythonhosted.org/packages/source/f/flufl.bounce/flufl.bounce-%{version}.tar.gz
|
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
|
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 setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-atpublic
|
Requires: python-atpublic
|
||||||
Requires: python-zope.interface
|
Requires: python-zope.interface
|
||||||
@ -43,14 +47,14 @@ BuildArch: noarch
|
|||||||
Email bounce detectors.
|
Email bounce detectors.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n flufl.bounce-%{version}
|
%autosetup -p1 -n flufl.bounce-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
cp %{SOURCE1} .
|
cp %{SOURCE1} .
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@ -62,6 +66,6 @@ cp %{SOURCE1} .
|
|||||||
%dir %{python_sitelib}/flufl
|
%dir %{python_sitelib}/flufl
|
||||||
%{python_sitelib}/flufl/bounce
|
%{python_sitelib}/flufl/bounce
|
||||||
%{python_sitelib}/flufl.bounce-*.pth
|
%{python_sitelib}/flufl.bounce-*.pth
|
||||||
%{python_sitelib}/flufl.bounce-%{version}*-info
|
%{python_sitelib}/flufl.bounce-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
53
use-correct-assertion-methods.patch
Normal file
53
use-correct-assertion-methods.patch
Normal file
@ -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?= <tomas.hrnciar@me.com>
|
||||||
|
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
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user