diff --git a/python-3.13.1.patch b/python-3.13.1.patch index 7628f37..a9e34d5 100644 --- a/python-3.13.1.patch +++ b/python-3.13.1.patch @@ -1,27 +1,27 @@ -Index: wxPython-4.2.2/unittests/test_cmdproc.py -=================================================================== ---- wxPython-4.2.2.orig/unittests/test_cmdproc.py -+++ wxPython-4.2.2/unittests/test_cmdproc.py -@@ -41,19 +41,19 @@ class cmdproc_Tests(wtc.WidgetTestCase): +From 2adbeaa7854342a27aab828c128f2111a99c4cf0 Mon Sep 17 00:00:00 2001 +From: Scott Talbert +Date: Thu, 23 Jan 2025 21:46:20 -0500 +Subject: [PATCH] Implement __iter__ for wxList iterator classes + +This fixes being able to use these classes in for loops, for example. +Specifically it fixes the cmdproc tests with Python 3.13.1. +--- + etgtools/tweaker_tools.py | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/etgtools/tweaker_tools.py b/etgtools/tweaker_tools.py +index b1ae6e7fc..9238a130c 100644 +--- a/etgtools/tweaker_tools.py ++++ b/etgtools/tweaker_tools.py +@@ -1055,6 +1055,11 @@ class {ListClass}_iterator {{ + if (PyErr_Occurred()) + return NULL; + %End ++ ++ PyObject* __iter__(); ++ %MethodCode ++ return PyObject_SelfIter(sipSelf); ++ %End + }}; - cmds = cmdproc.GetCommands() - self.assertEqual(len(cmds), 5) -- self.assertEqual([x.value for x in cmds], [True]*5) -+ self.assertEqual([x.value for x in list(cmds)], [True]*5) - - self.assertTrue(cmdproc.CanUndo()) - self.assertFalse(cmdproc.CanRedo()) - - cmdproc.Undo() - cmdproc.Undo() -- self.assertEqual([x.value for x in cmds], [True]*3 + [False]*2) -+ self.assertEqual([x.value for x in list(cmds)], [True]*3 + [False]*2) - - self.assertTrue(cmdproc.CanRedo()) - cmdproc.Redo() - cmdproc.Redo() -- self.assertEqual([x.value for x in cmds], [True]*5) -+ self.assertEqual([x.value for x in list(cmds)], [True]*5) - - cmdproc.Undo() - cmdproc.Undo() + class {ListClass} diff --git a/python-wxPython.changes b/python-wxPython.changes index f7cdb24..6397174 100644 --- a/python-wxPython.changes +++ b/python-wxPython.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jan 24 13:23:55 UTC 2025 - Markéta Machová + +- Replace python-3.13.1.patch by a patch proposed by upstream maintainers + ------------------------------------------------------------------- Mon Jan 20 17:58:04 UTC 2025 - Markéta Machová diff --git a/python-wxPython.spec b/python-wxPython.spec index 6c19640..1c60f22 100644 --- a/python-wxPython.spec +++ b/python-wxPython.spec @@ -98,8 +98,8 @@ Patch15: CVE-2024-50602-no-crash-XML_ResumeParser.patch # PATCH-FIX-OPENSUSE - Test fixes/additions: Patch112: 0001-Check-HSV-values-in-image-test.patch Patch114: wxwidgets-3.2.5.patch -# PATCH-FIX-UPSTREAM https://github.com/wxWidgets/Phoenix/pull/2678 Fix test with Python 3.13.1 -Patch115: python-3.13.1.patch +# PATCH-FIX-UPSTREAM https://github.com/wxWidgets/Phoenix/pull/2680 Implement __iter__ for wxList iterator classes +Patch115: https://github.com/wxWidgets/Phoenix/commit/2adbeaa7854342a27aab828c128f2111a99c4cf0.patch#/python-3.13.1.patch # TODO: Replace deprecated setup.py calls in build.py with PEP517 without building wxWidgets into the wheel BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module devel}