From 11b0fd3312d6b6167fbd482cacbd95584526e9a6a1eb95df21bb2ab91b76e7b1 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 18 Mar 2024 05:35:27 +0000 Subject: [PATCH] - Add patch python-312.patch: * Fiddle with the refcounting for Python 3.12. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-unittest-xml-reporting?expand=0&rev=34 --- python-312.patch | 13 +++++++++++++ python-unittest-xml-reporting.changes | 6 ++++++ python-unittest-xml-reporting.spec | 2 ++ 3 files changed, 21 insertions(+) create mode 100644 python-312.patch diff --git a/python-312.patch b/python-312.patch new file mode 100644 index 0000000..8a6da38 --- /dev/null +++ b/python-312.patch @@ -0,0 +1,13 @@ +Index: unittest-xml-reporting-3.2.0/tests/testsuite.py +=================================================================== +--- unittest-xml-reporting-3.2.0.orig/tests/testsuite.py ++++ unittest-xml-reporting-3.2.0/tests/testsuite.py +@@ -807,6 +807,8 @@ class XMLTestRunnerTestCase(unittest.Tes + countBeforeTest = sys.getrefcount(self.DummyRefCountTest.dummy) + runner = self._test_xmlrunner(suite) + countAfterTest = sys.getrefcount(self.DummyRefCountTest.dummy) ++ if sys.version_info >= (3, 12): ++ countBeforeTest += 1 + self.assertEqual(countBeforeTest, countAfterTest) + + class StderrXMLTestRunner(xmlrunner.XMLTestRunner): diff --git a/python-unittest-xml-reporting.changes b/python-unittest-xml-reporting.changes index 9954d79..a2b017b 100644 --- a/python-unittest-xml-reporting.changes +++ b/python-unittest-xml-reporting.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 18 05:33:49 UTC 2024 - Steve Kowalik + +- Add patch python-312.patch: + * Fiddle with the refcounting for Python 3.12. + ------------------------------------------------------------------- Tue Jan 30 05:50:30 UTC 2024 - Steve Kowalik diff --git a/python-unittest-xml-reporting.spec b/python-unittest-xml-reporting.spec index 260ca0b..dc57c11 100644 --- a/python-unittest-xml-reporting.spec +++ b/python-unittest-xml-reporting.spec @@ -25,6 +25,8 @@ URL: https://github.com/xmlrunner/unittest-xml-reporting Source: https://github.com/xmlrunner/unittest-xml-reporting/archive/%{version}.tar.gz # PATCH-FIX-UPSTREAM python-311.patch gh#xmlrunner/unittest-xml-reporting#274 Patch0: python-311.patch +# PATCH-FIX-OPENSUSE Add one to the refcount for Python 3.12 +Patch1: python-312.patch BuildRequires: %{python_module lxml} BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest}