14
0

2 Commits

Author SHA256 Message Date
80813f7f8e Accepting request 1305067 from devel:languages:python
- Add patch resolve-testcase-eq-deprecation-warning.patch:
  * Don't rely on bool(NotImplemented) which is now a TypeError in
    Python 3.14.

OBS-URL: https://build.opensuse.org/request/show/1305067
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-testtools?expand=0&rev=37
2025-09-17 14:37:11 +00:00
b387000191 - Add patch resolve-testcase-eq-deprecation-warning.patch:
* Don't rely on bool(NotImplemented) which is now a TypeError in
    Python 3.14.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-testtools?expand=0&rev=88
2025-09-16 05:42:34 +00:00
3 changed files with 41 additions and 1 deletions

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Sep 16 05:42:20 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch resolve-testcase-eq-deprecation-warning.patch:
* Don't rely on bool(NotImplemented) which is now a TypeError in
Python 3.14.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Sep 23 14:06:48 UTC 2024 - Markéta Machová <mmachova@suse.com> Mon Sep 23 14:06:48 UTC 2024 - Markéta Machová <mmachova@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-testtools # spec file for package python-testtools
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC and contributors
# #
# 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
@@ -34,6 +34,8 @@ URL: https://github.com/testing-cabal/testtools
Source0: https://files.pythonhosted.org/packages/source/t/testtools/testtools-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/t/testtools/testtools-%{version}.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/testing-cabal/testtools/commit/5b8cb6497c7159f593e68de6a13e15f7e78e56e3 Prepare tests for upcoming twisted version # PATCH-FIX-UPSTREAM https://github.com/testing-cabal/testtools/commit/5b8cb6497c7159f593e68de6a13e15f7e78e56e3 Prepare tests for upcoming twisted version
Patch0: twisted.patch Patch0: twisted.patch
# PATCH-FIX-UPSTREAM gh#testing-cabal/testtools#424/commits/79fa5d41a05c423cf43a65d2b347c7c566bcdfa5
Patch1: resolve-testcase-eq-deprecation-warning.patch
BuildRequires: %{python_module hatch_vcs} BuildRequires: %{python_module hatch_vcs}
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel} BuildRequires: %{python_module wheel}

View File

@@ -0,0 +1,31 @@
From 79fa5d41a05c423cf43a65d2b347c7c566bcdfa5 Mon Sep 17 00:00:00 2001
From: Stephen Finucane <stephen@that.guru>
Date: Fri, 21 Feb 2025 11:14:35 +0000
Subject: [PATCH] Resolve deprecation warning
See [1] for more info.
[1] https://github.com/python/cpython/issues/79893
Signed-off-by: Stephen Finucane <stephen@that.guru>
---
testtools/testcase.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/testtools/testcase.py b/testtools/testcase.py
index ad983730..4f4923b3 100644
--- a/testtools/testcase.py
+++ b/testtools/testcase.py
@@ -268,8 +268,10 @@ def _reset(self):
def __eq__(self, other):
eq = getattr(unittest.TestCase, "__eq__", None)
- if eq is not None and not unittest.TestCase.__eq__(self, other):
- return False
+ if eq is not None:
+ eq_ = unittest.TestCase.__eq__(self, other)
+ if eq_ is NotImplemented or not eq_:
+ return False
return self.__dict__ == getattr(other, "__dict__", None)
# We need to explicitly set this since we're overriding __eq__