Sync from SUSE:SLFO:Main python-wxPython revision 35746d1cf3fbfe866ad13611320eadf6
This commit is contained in:
parent
a28544cf7a
commit
4db98adcd1
@ -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 <swt@techie.net>
|
||||
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}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 24 13:23:55 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Replace python-3.13.1.patch by a patch proposed by upstream maintainers
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 20 17:58:04 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
|
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user