1
0

Compare commits

...

12 Commits

Author SHA256 Message Date
f554308e36 Accepting request 1248820 from X11:wxWidgets
OBS-URL: https://build.opensuse.org/request/show/1248820
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-wxPython?expand=0&rev=30
2025-02-28 16:38:14 +00:00
9573010936 - Replace python-3.13.1.patch by a patch proposed by upstream maintainers
OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=69
2025-02-27 01:35:55 +00:00
4b7ed0c956 Accepting request 1239533 from X11:wxWidgets
OBS-URL: https://build.opensuse.org/request/show/1239533
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-wxPython?expand=0&rev=29
2025-01-23 16:57:15 +00:00
cd34ff9c3d - Add patch python-3.13.1.patch to fix tests with Python 3.13.1
- Factory is not built on Python 3.10 anymore

OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=67
2025-01-22 13:52:41 +00:00
23d557738b Revert r65: nothing in openSUSE seems to require symbol 'wxWidgets_API'
OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=66
2024-12-01 10:56:19 +00:00
b001c36e5d - Provides: wxWidgets_API should have version number from the version of wxGTK3 used.
- Clean up the SPEC file with spec-cleaner.

OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=65
2024-11-30 16:15:22 +00:00
95c0b74b4f Accepting request 1225318 from X11:wxWidgets
OBS-URL: https://build.opensuse.org/request/show/1225318
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-wxPython?expand=0&rev=28
2024-11-21 14:13:14 +00:00
d1d6fba381 - Disable python3 (=3.6) flavor for 15.X
* Upstream only supports Python 3.7+
  * Requires sip 6.8 which only supports Python 3.8+

OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=63
2024-11-20 15:22:45 +00:00
b6b05a1bb9 Accepting request 1223619 from X11:wxWidgets
OBS-URL: https://build.opensuse.org/request/show/1223619
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-wxPython?expand=0&rev=27
2024-11-12 18:20:02 +00:00
5bd36393be - Add CVE-2024-50602-no-crash-XML_ResumeParser.patch fixing a
crash in the vendored libexpat’s XML_ResumeParser function
  (bsc#1232590, CVE-2024-50602).

OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=61
2024-11-12 10:03:18 +00:00
47aaf0661c Accepting request 1208550 from X11:wxWidgets
- Update to version 4.2.2:
  + Fix some Python 3.12 compatibility issues (segfault on exit) by upgrading sip & waf
  + Fix more float/int conversion issues in wx.lib classes
  + Add initialValue argument to wx.lib.DirBrowseButton
  + Fix wxImage.Clear()
  + Fix blurry text in AuiNotebook tab
  + Add support for frozen rows and columns to GridWithLabelRenderersMixin
  + demo: ShortcutEditor: Fix broken call GetMenuBar()
  + Add proper support for DataViewCheckIconTextRenderer
  + Build: Use new tarfile.extractall() filter for safer tarfile extraction
  + Fix typo in wx.lib.agw.persist_handlers
  + Fix 'str' to 'wxString' converstation, when emoji is inside string
  + Use unwrap before isbuiltin check
  + Preserve pane icons when loading a perspective in agw.aui
  + wx.agw.aui: don't uninitialize the AuiManager if the window close event is vetoed
  + Pure python AUI: Make behavior in all platforms more equal
  + wx.agw.aui. Do layout as the last step after all pane infos have recomputed their best sizes
  + Fix additional SyntaxWarnings with Python 3.12
  + Fix wx.lib.agw.ribbon.RibbonButtonBar DeleteButton function
  + UltimateListCtrl: Add support for ULC_AUTO_CHECK_PARENT
  + Remove dependency on distutils
  + Improve wx.lib.agw.FlatMenu memory usage
  + Support NumPy 2.0
  + Fix EditLabel on CustomTreeCtrl doesn't automatically select the entire text
  + Fix Widgets placed in the UltimateListControl are drawn in the wrong location
  + Fix wx.lib.agw.aui sometimes shows "ghost" docking guide
  + Fix Thumbnailctrl SetSelection raises exception if it tries to scroll
- Add python-six BuildRequires: needed for the test suite.
- Drop upstream merged patches:
  + 0001-Update-wxTextCtrl-OSX-overrides-since-they-re-now-do.patch
  + 0001-Handle-wxGLCanvas-CreateSurface-which-is-only-availa.patch
  + 0001-Support-building-with-Doxygen-1.9.7.patch
  + 0001-wxWidgets-Phoenix-integer-division.patch
  + 0003-Make-pip-usage-in-wxget-optional.patch
  + require-numpy.patch
  + drop-py2.patch
  + Phoenix-pr2580+2591+2592-numpy2.patch

OBS-URL: https://build.opensuse.org/request/show/1208550
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-wxPython?expand=0&rev=26
2024-10-17 16:38:31 +00:00
856a9169d7 - Update to version 4.2.2
Unfortunatley still fails against new webkit on i586 (see Staging:G)

OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=59
2024-10-04 13:05:19 +00:00
17 changed files with 182 additions and 6309 deletions

View File

@ -1,33 +0,0 @@
From 371101db7a010d679d214fde617dae9de02008d9 Mon Sep 17 00:00:00 2001
From: Scott Talbert <swt@techie.net>
Date: Fri, 14 Jul 2023 13:23:03 -0400
Subject: [PATCH] Handle wxGLCanvas::CreateSurface which is only available on
EGL
---
etg/_glcanvas.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/etg/_glcanvas.py b/etg/_glcanvas.py
index 52992ed8..2e578645 100644
--- a/etg/_glcanvas.py
+++ b/etg/_glcanvas.py
@@ -125,6 +125,15 @@ def run():
sipRes = wxGLCanvas::IsDisplaySupported(attribPtr);
""")
+ c.find('CreateSurface').setCppCode("""\
+ #if wxUSE_GLCANVAS_EGL
+ return self->CreateSurface();
+ #else
+ wxPyRaiseNotImplemented();
+ return false;
+ #endif
+ """)
+
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)
--
2.43.0

View File

@ -1,48 +0,0 @@
From 6a049ccc0ad96f25c3f7d8540b218ffe8921d8c5 Mon Sep 17 00:00:00 2001
From: Scott Talbert <swt@techie.net>
Date: Tue, 5 Dec 2023 23:42:21 -0500
Subject: [PATCH] Support building with Doxygen 1.9.7
Doxygen 1.9.7 made some changes whereby some method definitions are now
defined in separate XML files, with a "refid" that links to them. In
order to support this, we need to follow these "refids" to pick up the
method definition from the separate group XML files.
---
etgtools/extractors.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/etgtools/extractors.py b/etgtools/extractors.py
index 8c992cb14..5ae1361f9 100644
--- a/etgtools/extractors.py
+++ b/etgtools/extractors.py
@@ -62,6 +62,8 @@ def extract(self, element):
# class. Should be overridden in derived classes to get what each one
# needs in addition to the base.
self.name = element.find(self.nameTag).text
+ if self.name is None:
+ self.name = ''
if '::' in self.name:
loc = self.name.rfind('::')
self.name = self.name[loc+2:]
@@ -1574,12 +1576,21 @@ def addElement(self, element):
extractingMsg(kind, element)
for node in element.findall('sectiondef/memberdef'):
self.addElement(node)
+ for node in element.findall('sectiondef/member'):
+ node = self.resolveRefid(node)
+ self.addElement(node)
else:
raise ExtractorError('Unknown module item kind: %s' % kind)
return item
+ def resolveRefid(self, node):
+ from etgtools import XMLSRC
+ refid = node.get('refid')
+ fname = os.path.join(XMLSRC, refid.rsplit('_', 1)[0]) + '.xml'
+ root = et.parse(fname).getroot()
+ return root.find(".//memberdef[@id='{}']".format(refid))
def addCppFunction(self, type, name, argsString, body, doc=None, **kw):

View File

@ -1,73 +0,0 @@
From 7a198b8cae9a81cec4d25a0c6c5cc65ad8822bb2 Mon Sep 17 00:00:00 2001
From: Scott Talbert <swt@techie.net>
Date: Mon, 20 Nov 2023 22:12:58 -0500
Subject: [PATCH] Update wxTextCtrl OSX overrides since they're now documented
---
etg/textctrl.py | 48 +++++++++++++++++++++---------------------------
1 file changed, 21 insertions(+), 27 deletions(-)
diff --git a/etg/textctrl.py b/etg/textctrl.py
index af631a53..690d68c4 100644
--- a/etg/textctrl.py
+++ b/etg/textctrl.py
@@ -114,35 +114,29 @@ def parseAndTweakModule():
# OSX methods for controlling native features
- c.addCppMethod('void', 'OSXEnableAutomaticQuoteSubstitution', '(bool enable)',
- doc="Mac-only method for turning on/off automatic quote substitutions.",
- body="""\
- #ifdef __WXMAC__
- self->OSXEnableAutomaticQuoteSubstitution(enable);
- #else
- wxPyRaiseNotImplemented();
- #endif
- """)
+ c.find('OSXEnableAutomaticQuoteSubstitution').setCppCode("""\
+ #ifdef __WXMAC__
+ self->OSXEnableAutomaticQuoteSubstitution(enable);
+ #else
+ wxPyRaiseNotImplemented();
+ #endif
+ """)
- c.addCppMethod('void', 'OSXEnableAutomaticDashSubstitution', '(bool enable)',
- doc="Mac-only method for turning on/off automatic dash substitutions.",
- body="""\
- #ifdef __WXMAC__
- self->OSXEnableAutomaticDashSubstitution(enable);
- #else
- wxPyRaiseNotImplemented();
- #endif
- """)
+ c.find('OSXEnableAutomaticDashSubstitution').setCppCode("""\
+ #ifdef __WXMAC__
+ self->OSXEnableAutomaticDashSubstitution(enable);
+ #else
+ wxPyRaiseNotImplemented();
+ #endif
+ """)
- c.addCppMethod('void', 'OSXDisableAllSmartSubstitutions', '()',
- doc="Mac-only method to disable all automatic text substitutions.",
- body="""\
- #ifdef __WXMAC__
- self->OSXDisableAllSmartSubstitutions();
- #else
- wxPyRaiseNotImplemented();
- #endif
- """)
+ c.find('OSXDisableAllSmartSubstitutions').setCppCode("""\
+ #ifdef __WXMAC__
+ self->OSXDisableAllSmartSubstitutions();
+ #else
+ wxPyRaiseNotImplemented();
+ #endif
+ """)
# TODO: add support for wxTextProofOptions (only supported on MSW/GTK3)
# so will need stubs on other platforms.
--
2.43.0

View File

@ -1,25 +0,0 @@
From 3b042c863f4092f802a877a972fd6eb284451a78 Mon Sep 17 00:00:00 2001
From: Ben Greiner <code@bnavigator.de>
Date: Sat, 6 Jan 2024 21:58:29 +0100
Subject: [PATCH] integer division for randint
Python 3.12 does not accept floats for random.randint() anymore
---
unittests/test_dcDrawLists.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/unittests/test_dcDrawLists.py b/unittests/test_dcDrawLists.py
index 9e35e5eaf..6696a79a0 100644
--- a/unittests/test_dcDrawLists.py
+++ b/unittests/test_dcDrawLists.py
@@ -63,8 +63,8 @@ def makeRandomRectangles():
rects = []
for i in range(num):
- W = random.randint(10, w/2)
- H = random.randint(10, h/2)
+ W = random.randint(10, w//2)
+ H = random.randint(10, h//2)
x = random.randint(0, w - W)
y = random.randint(0, h - H)
rects.append( (x, y, W, H) )

View File

@ -1,49 +0,0 @@
From 00ba66a86f65abb24402427d66bf50e8da477321 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Tue, 28 Jun 2022 18:16:34 +0200
Subject: [PATCH 3/4] Make pip usage in wxget optional
As the code states, using pip to download is abusing it, and as it is
just a fallback in case neither wget nor urllib works.
---
wx/tools/wxget.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/wx/tools/wxget.py b/wx/tools/wxget.py
index c83ced7a..75eb0f47 100644
--- a/wx/tools/wxget.py
+++ b/wx/tools/wxget.py
@@ -33,7 +33,6 @@ import os
import wx
import subprocess
import ssl
-import pip
if sys.version_info >= (3,):
from urllib.error import (HTTPError, URLError)
@@ -44,6 +43,11 @@ else:
from urllib2 import (HTTPError, URLError)
import urlparse
+try:
+ import pip
+except ImportError as e:
+ pip = None
+
def get_docs_demo_url(demo=False):
""" Get the URL for the docs or demo."""
if demo:
@@ -196,8 +200,8 @@ def download_file(url, dest=None, force=False, trusted=False):
success = download_wget(url, filename, trusted) # Try wget
if not success:
success = download_urllib(url, filename) # Try urllib
- if not success:
- success = download_pip(url, filename, force, trusted) # Try urllib
+ if not success and pip not None:
+ success = download_pip(url, filename, force, trusted) # Try pip
if not success:
split_url = url.split('/')
msg = '\n'.join([
--
2.36.1

View File

@ -16,10 +16,10 @@ C standard, it could even be a double).
unittests/test_wxdatetime.py | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/etg/defs.py b/etg/defs.py
index 4445cf93..ceb9e2ef 100644
--- a/etg/defs.py
+++ b/etg/defs.py
Index: wxPython-4.2.2/etg/defs.py
===================================================================
--- wxPython-4.2.2.orig/etg/defs.py
+++ wxPython-4.2.2/etg/defs.py
@@ -73,7 +73,7 @@ def run():
td = module.find('wxUIntPtr')
module.insertItemAfter(td, etgtools.TypedefDef(type='wchar_t', name='wxUChar'))
@ -27,13 +27,13 @@ index 4445cf93..ceb9e2ef 100644
- module.insertItemAfter(td, etgtools.TypedefDef(type='wxInt64', name='time_t'))
+ module.insertItemAfter(td, etgtools.TypedefDef(type='long', name='time_t'))
module.insertItemAfter(td, etgtools.TypedefDef(type='long long', name='wxFileOffset'))
module.insertItemAfter(td, etgtools.TypedefDef(type='SIP_SSIZE_T', name='ssize_t'))
module.insertItemAfter(td, etgtools.TypedefDef(type='Py_ssize_t', name='ssize_t'))
module.insertItemAfter(td, etgtools.TypedefDef(type='unsigned char', name='byte', pyInt=True))
diff --git a/unittests/test_wxdatetime.py b/unittests/test_wxdatetime.py
index 62e7d141..2f620045 100644
--- a/unittests/test_wxdatetime.py
+++ b/unittests/test_wxdatetime.py
@@ -25,9 +25,15 @@ class datetime_Tests(wtc.WidgetTestCase):
Index: wxPython-4.2.2/unittests/test_wxdatetime.py
===================================================================
--- wxPython-4.2.2.orig/unittests/test_wxdatetime.py
+++ wxPython-4.2.2/unittests/test_wxdatetime.py
@@ -25,9 +25,15 @@ class datetime_Tests(wtc.WidgetTestCase)
def test_datetime2(self):
d1 = wx.DateTime.FromHMS(8, 15, 45, 123)
d2 = wx.DateTime.FromJDN(12345.67)
@ -50,6 +50,3 @@ index 62e7d141..2f620045 100644
def test_datetime3(self):
d1 = wx.DateTime.Today()
d2 = wx.DateTime.Now()
--
2.36.1

View File

@ -0,0 +1,59 @@
---
ext/wxWidgets/src/expat/expat/lib/expat.h | 4 +++-
ext/wxWidgets/src/expat/expat/lib/xmlparse.c | 11 ++++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
--- a/ext/wxWidgets/src/expat/expat/lib/expat.h
+++ b/ext/wxWidgets/src/expat/expat/lib/expat.h
@@ -127,7 +127,9 @@ enum XML_Error {
/* Added in 2.3.0. */
XML_ERROR_NO_BUFFER,
/* Added in 2.4.0. */
- XML_ERROR_AMPLIFICATION_LIMIT_BREACH
+ XML_ERROR_AMPLIFICATION_LIMIT_BREACH,
+ /* Added in 2.6.4. */
+ XML_ERROR_NOT_STARTED,
};
enum XML_Content_Type {
--- a/ext/wxWidgets/src/expat/expat/lib/xmlparse.c
+++ b/ext/wxWidgets/src/expat/expat/lib/xmlparse.c
@@ -2207,6 +2207,9 @@ XML_StopParser(XML_Parser parser, XML_Bo
if (parser == NULL)
return XML_STATUS_ERROR;
switch (parser->m_parsingStatus.parsing) {
+ case XML_INITIALIZED:
+ parser->m_errorCode = XML_ERROR_NOT_STARTED;
+ return XML_STATUS_ERROR;
case XML_SUSPENDED:
if (resumable) {
parser->m_errorCode = XML_ERROR_SUSPENDED;
@@ -2217,7 +2220,7 @@ XML_StopParser(XML_Parser parser, XML_Bo
case XML_FINISHED:
parser->m_errorCode = XML_ERROR_FINISHED;
return XML_STATUS_ERROR;
- default:
+ case XML_PARSING:
if (resumable) {
#ifdef XML_DTD
if (parser->m_isParamEntity) {
@@ -2228,6 +2231,9 @@ XML_StopParser(XML_Parser parser, XML_Bo
parser->m_parsingStatus.parsing = XML_SUSPENDED;
} else
parser->m_parsingStatus.parsing = XML_FINISHED;
+ break;
+ default:
+ assert(0);
}
return XML_STATUS_OK;
}
@@ -2493,6 +2499,9 @@ XML_ErrorString(enum XML_Error code) {
return XML_L(
"limit on input amplification factor (from DTD and entities) breached");
}
+ /* Added in 2.6.4. */
+ case XML_ERROR_NOT_STARTED:
+ return XML_L("parser not started");
return NULL;
}

View File

@ -1,382 +0,0 @@
From fa9050f865855392e8fa2bc95d53ade24d06e049 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Randy=20D=C3=B6ring?=
<30527984+radoering@users.noreply.github.com>
Date: Fri, 19 Jul 2024 18:00:02 +0200
Subject: [PATCH 1/2] Fix NumPy 2.0 deprecations via running `ruff check
--select NPY201 --fix --exclude
docs/sphinx/rest_substitutions/snippets/python/converted`
See https://numpy.org/devdocs/numpy_2_0_migration_guide.html#numpy-2-0-migration-guide
---
demo/FloatCanvas.py | 14 +++++++-------
samples/floatcanvas/MovingElements.py | 2 +-
samples/floatcanvas/MovingTriangle.py | 4 ++--
samples/floatcanvas/PolyEditor.py | 2 +-
samples/floatcanvas/ProcessDiagram.py | 2 +-
samples/floatcanvas/TextBox.py | 10 +++++-----
samples/floatcanvas/Tree.py | 2 +-
wx/lib/floatcanvas/FloatCanvas.py | 4 ++--
wx/lib/plot/examples/demo.py | 2 +-
wx/lib/plot/plotcanvas.py | 2 +-
10 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/demo/FloatCanvas.py b/demo/FloatCanvas.py
index 48d971cf3..f797340de 100644
--- a/demo/FloatCanvas.py
+++ b/demo/FloatCanvas.py
@@ -720,7 +720,7 @@ def TestHitTest(self, event=None):
x += dx
color = "SEA GREEN"
- Points = N.array(( (x, y), (x, y+2.*h/3), (x+w, y+h), (x+w, y+h/2.), (x + 2.*w/3, y+h/2.), (x + 2.*w/3,y) ), N.float_)
+ Points = N.array(( (x, y), (x, y+2.*h/3), (x+w, y+h), (x+w, y+h/2.), (x + 2.*w/3, y+h/2.), (x + 2.*w/3,y) ), N.float64)
R = Canvas.AddPolygon(Points, LineWidth = 2, FillColor = color)
R.Name = color + " Polygon"
R.Bind(FloatCanvas.EVT_FC_RIGHT_DOWN, self.RectGotHitRight)
@@ -729,7 +729,7 @@ def TestHitTest(self, event=None):
x += dx
color = "Red"
- Points = N.array(( (x, y), (x, y+2.*h/3), (x+w, y+h), (x+w, y+h/2.), (x + 2.*w/3, y+h/2.), (x + 2.*w/3,y) ), N.float_)
+ Points = N.array(( (x, y), (x, y+2.*h/3), (x+w, y+h), (x+w, y+h/2.), (x + 2.*w/3, y+h/2.), (x + 2.*w/3,y) ), N.float64)
R = Canvas.AddPointSet(Points, Diameter = 4, Color = color)
R.Name = "PointSet"
R.Bind(FloatCanvas.EVT_FC_LEFT_DOWN, self.PointSetGotHit)
@@ -1139,7 +1139,7 @@ def TestScaledTextBox(self, event= None):
Family = wx.FONTFAMILY_ROMAN,
Alignment = "right"
)
- Point = N.array((100, -20), N.float_)
+ Point = N.array((100, -20), N.float64)
Box = Canvas.AddScaledTextBox("Here is even more auto wrapped text. This time the line spacing is set to 0.8. \n\nThe Padding is set to 0.",
Point,
Size = 3,
@@ -1153,7 +1153,7 @@ def TestScaledTextBox(self, event= None):
)
Canvas.AddPoint(Point, "Red", 2)
- Point = N.array((0, -40), N.float_)
+ Point = N.array((0, -40), N.float64)
# Point = N.array((0, 0), N.float_)
for Position in ["tl", "bl", "tr", "br"]:
# for Position in ["br"]:
@@ -1172,7 +1172,7 @@ def TestScaledTextBox(self, event= None):
)
Canvas.AddPoint(Point, "Red", 4)
- Point = N.array((-20, 60), N.float_)
+ Point = N.array((-20, 60), N.float64)
Box = Canvas.AddScaledTextBox("Here is some\ncentered\ntext",
Point,
Size = 4,
@@ -1188,7 +1188,7 @@ def TestScaledTextBox(self, event= None):
LineSpacing = 0.8
)
- Point = N.array((-20, 20), N.float_)
+ Point = N.array((-20, 20), N.float64)
Box = Canvas.AddScaledTextBox("Here is some\nright aligned\ntext",
Point,
Size = 4,
@@ -1203,7 +1203,7 @@ def TestScaledTextBox(self, event= None):
LineSpacing = 0.8
)
- Point = N.array((100, -60), N.float_)
+ Point = N.array((100, -60), N.float64)
Box = Canvas.AddScaledTextBox("Here is some auto wrapped text. This time it is centered, rather than right aligned.\n\nThe Padding is set to 2.",
Point,
Size = 3,
diff --git a/samples/floatcanvas/MovingElements.py b/samples/floatcanvas/MovingElements.py
index 40db28585..75229c07d 100644
--- a/samples/floatcanvas/MovingElements.py
+++ b/samples/floatcanvas/MovingElements.py
@@ -160,7 +160,7 @@ def CompPoints(self, XY, L):
Points = N.array(((0, c),
( L/2.0, -c/2.0),
(-L/2.0, -c/2.0)),
- N.float_)
+ N.float64)
Points += XY
return Points
diff --git a/samples/floatcanvas/MovingTriangle.py b/samples/floatcanvas/MovingTriangle.py
index f3277f212..822662467 100644
--- a/samples/floatcanvas/MovingTriangle.py
+++ b/samples/floatcanvas/MovingTriangle.py
@@ -64,7 +64,7 @@ def CompPoints(self, XY, L):
Points = N.array(((0, c),
( L/2.0, -c/2.0),
(-L/2.0, -c/2.0)),
- N.float_)
+ N.float64)
Points += XY
return Points
@@ -104,7 +104,7 @@ def __init__(self,parent, id,title,position,size):
Points = N.array(((0,0),
(1,0),
(0.5, 1)),
- N.float_)
+ N.float64)
data = (( (0,0), 1),
( (3,3), 2),
diff --git a/samples/floatcanvas/PolyEditor.py b/samples/floatcanvas/PolyEditor.py
index 55b1af429..270daa835 100644
--- a/samples/floatcanvas/PolyEditor.py
+++ b/samples/floatcanvas/PolyEditor.py
@@ -112,7 +112,7 @@ def OnMove(self, event):
dc.SetPen(wx.Pen('WHITE', 2, wx.SHORT_DASH))
dc.SetLogicalFunction(wx.XOR)
if self.SelectedPointNeighbors is None:
- self.SelectedPointNeighbors = N.zeros((3,2), N.float_)
+ self.SelectedPointNeighbors = N.zeros((3,2), N.float64)
#fixme: This feels very inelegant!
if Index == 0:
self.SelectedPointNeighbors[0] = self.SelectedPoly.Points[-1]
diff --git a/samples/floatcanvas/ProcessDiagram.py b/samples/floatcanvas/ProcessDiagram.py
index cf8609055..f67f89550 100644
--- a/samples/floatcanvas/ProcessDiagram.py
+++ b/samples/floatcanvas/ProcessDiagram.py
@@ -212,7 +212,7 @@ def CompPoints(self, XY, L):
Points = N.array(((0, c),
( L/2.0, -c/2.0),
(-L/2.0, -c/2.0)),
- N.float_)
+ N.float64)
Points += XY
return Points
diff --git a/samples/floatcanvas/TextBox.py b/samples/floatcanvas/TextBox.py
index 5badeb1d0..29db917c9 100644
--- a/samples/floatcanvas/TextBox.py
+++ b/samples/floatcanvas/TextBox.py
@@ -188,7 +188,7 @@ def __init__(self,parent, id,title,position,size):
Family = wx.ROMAN,
Alignment = "right"
)
- Point = N.array((100, -20), N.float_)
+ Point = N.array((100, -20), N.float64)
Box = Canvas.AddScaledTextBox("Here is even more auto wrapped text. This time the line spacing is set to 0.8. \n\nThe Padding is set to 0.",
Point,
Size = 3,
@@ -202,7 +202,7 @@ def __init__(self,parent, id,title,position,size):
)
Canvas.AddPoint(Point, "Red", 2)
- Point = N.array((0, -40), N.float_)
+ Point = N.array((0, -40), N.float64)
# Point = N.array((0, 0), N.float_)
for Position in ["tl", "bl", "tr", "br"]:
# for Position in ["br"]:
@@ -221,7 +221,7 @@ def __init__(self,parent, id,title,position,size):
)
Canvas.AddPoint(Point, "Red", 4)
- Point = N.array((-20, 60), N.float_)
+ Point = N.array((-20, 60), N.float64)
Box = Canvas.AddScaledTextBox("Here is some\ncentered\ntext",
Point,
Size = 4,
@@ -237,7 +237,7 @@ def __init__(self,parent, id,title,position,size):
LineSpacing = 0.8
)
- Point = N.array((-20, 20), N.float_)
+ Point = N.array((-20, 20), N.float64)
Box = Canvas.AddScaledTextBox("Here is some\nright aligned\ntext",
Point,
Size = 4,
@@ -252,7 +252,7 @@ def __init__(self,parent, id,title,position,size):
LineSpacing = 0.8
)
- Point = N.array((100, -60), N.float_)
+ Point = N.array((100, -60), N.float64)
Box = Canvas.AddScaledTextBox("Here is some auto wrapped text. This time it is centered, rather than right aligned.\n\nThe Padding is set to 2.",
Point,
Size = 3,
diff --git a/samples/floatcanvas/Tree.py b/samples/floatcanvas/Tree.py
index 7757651f5..4c75ac6af 100644
--- a/samples/floatcanvas/Tree.py
+++ b/samples/floatcanvas/Tree.py
@@ -204,7 +204,7 @@ def CompPoints(self, XY, L):
Points = N.array(((0, c),
( L/2.0, -c/2.0),
(-L/2.0, -c/2.0)),
- N.float_)
+ N.float64)
Points += XY
return Points
diff --git a/wx/lib/floatcanvas/FloatCanvas.py b/wx/lib/floatcanvas/FloatCanvas.py
index a0c316cd3..7e0d5a4b3 100644
--- a/wx/lib/floatcanvas/FloatCanvas.py
+++ b/wx/lib/floatcanvas/FloatCanvas.py
@@ -601,7 +601,7 @@ def Draw(self, Force=False):
"""
- if N.sometrue(self.PanelSize <= 2 ):
+ if any(self.PanelSize <= 2 ):
# it's possible for this to get called before being properly initialized.
return
if self.Debug: start = clock()
@@ -779,7 +779,7 @@ def ZoomToBB(self, NewBB=None, DrawFlag=True):
BoundingBox = self.BoundingBox
if (BoundingBox is not None) and (not BoundingBox.IsNull()):
self.ViewPortCenter = N.array(((BoundingBox[0,0]+BoundingBox[1,0])/2,
- (BoundingBox[0,1]+BoundingBox[1,1])/2 ),N.float_)
+ (BoundingBox[0,1]+BoundingBox[1,1])/2 ),N.float64)
self.MapProjectionVector = self.ProjectionFun(self.ViewPortCenter)
# Compute the new Scale
BoundingBox = BoundingBox*self.MapProjectionVector # this does need to make a copy!
diff --git a/wx/lib/plot/examples/demo.py b/wx/lib/plot/examples/demo.py
index 74312b772..ce1767b19 100644
--- a/wx/lib/plot/examples/demo.py
+++ b/wx/lib/plot/examples/demo.py
@@ -231,7 +231,7 @@ def _draw8Objects():
"""
Box plot
"""
- data1 = np.array([np.NaN, 337, 607, 583, 512, 531, 558, 381, 621, 574,
+ data1 = np.array([np.nan, 337, 607, 583, 512, 531, 558, 381, 621, 574,
538, 577, 679, 415, 454, 417, 635, 319, 350, 183,
863, 337, 607, 583, 512, 531, 558, 381, 621, 574,
538, 577, 679, 415, 454, 417, 635, 319, 350, 97])
diff --git a/wx/lib/plot/plotcanvas.py b/wx/lib/plot/plotcanvas.py
index 0e1e8a0e2..34ef5f02b 100644
--- a/wx/lib/plot/plotcanvas.py
+++ b/wx/lib/plot/plotcanvas.py
@@ -2044,7 +2044,7 @@ def UpdatePointLabel(self, mDataDict):
"""
if self.last_PointLabel is not None:
# compare pointXY
- if np.sometrue(
+ if any(
mDataDict["pointXY"] != self.last_PointLabel["pointXY"]):
# closest changed
self._drawPointLabel(self.last_PointLabel) # erase old
From 4e09cda937140d3c41b39830c55a272943f36aea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Randy=20D=C3=B6ring?=
<30527984+radoering@users.noreply.github.com>
Date: Sat, 20 Jul 2024 07:46:26 +0200
Subject: [PATCH 2/2] Use `numpy.any` instead of `any` because the latter does
not work for multidimensional arrays.
---
wx/lib/floatcanvas/FloatCanvas.py | 2 +-
wx/lib/plot/plotcanvas.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/wx/lib/floatcanvas/FloatCanvas.py b/wx/lib/floatcanvas/FloatCanvas.py
index 7e0d5a4b3..ebdd689fb 100644
--- a/wx/lib/floatcanvas/FloatCanvas.py
+++ b/wx/lib/floatcanvas/FloatCanvas.py
@@ -601,7 +601,7 @@ def Draw(self, Force=False):
"""
- if any(self.PanelSize <= 2 ):
+ if N.any(self.PanelSize <= 2 ):
# it's possible for this to get called before being properly initialized.
return
if self.Debug: start = clock()
diff --git a/wx/lib/plot/plotcanvas.py b/wx/lib/plot/plotcanvas.py
index 34ef5f02b..b9f65d8db 100644
--- a/wx/lib/plot/plotcanvas.py
+++ b/wx/lib/plot/plotcanvas.py
@@ -2044,7 +2044,7 @@ def UpdatePointLabel(self, mDataDict):
"""
if self.last_PointLabel is not None:
# compare pointXY
- if any(
+ if np.any(
mDataDict["pointXY"] != self.last_PointLabel["pointXY"]):
# closest changed
self._drawPointLabel(self.last_PointLabel) # erase old
From 3871204fd00e821c0ab3a67ec48afde6155b5222 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Thu, 29 Aug 2024 15:05:41 +1000
Subject: [PATCH] Replace N.alltrue() with N.all()
Building on the excellent work in f7d1d818, replace the two uses of
N.alltrue() with N.all(), since the former has been removed in numpy
2.0.
---
unittests/test_lib_floatcanvas_bbox.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/unittests/test_lib_floatcanvas_bbox.py b/unittests/test_lib_floatcanvas_bbox.py
index 42ced9c83..11d159534 100644
--- a/unittests/test_lib_floatcanvas_bbox.py
+++ b/unittests/test_lib_floatcanvas_bbox.py
@@ -460,7 +460,7 @@ class testNullBBox(wtc.WidgetTestCase):
B3 = BBox( ( (1.0, 2.0), (5.0, 10.0) ) )
def testValues(self):
- self.assertTrue( N.alltrue(N.isnan(self.B1)) )
+ self.assertTrue( N.all(N.isnan(self.B1)) )
def testIsNull(self):
self.assertTrue( self.B1.IsNull )
@@ -496,7 +496,7 @@ class testInfBBox(wtc.WidgetTestCase):
NB = NullBBox()
def testValues(self):
- self.assertTrue( N.alltrue(N.isinf(self.B1)) )
+ self.assertTrue( N.all(N.isinf(self.B1)) )
# def testIsNull(self):
# self.assertTrue( self.B1.IsNull )
From ad8135462c7d140590e28fc37f9e6cbc263e5b0c Mon Sep 17 00:00:00 2001
From: Ben Greiner <code@bnavigator.de>
Date: Thu, 29 Aug 2024 12:27:09 +0200
Subject: [PATCH] replace old numpy types no longer valid in numpy 2
---
unittests/test_lib_floatcanvas_bbox.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/unittests/test_lib_floatcanvas_bbox.py b/unittests/test_lib_floatcanvas_bbox.py
index 42ced9c83..35630a452 100644
--- a/unittests/test_lib_floatcanvas_bbox.py
+++ b/unittests/test_lib_floatcanvas_bbox.py
@@ -30,7 +30,7 @@ def testShape3(self):
self.assertRaises(ValueError, BBox, (0,0,5,6,7) )
def testArrayConstruction(self):
- A = N.array(((4,5),(10,12)), N.float_)
+ A = N.array(((4,5),(10,12)), N.float64)
B = BBox(A)
self.assertTrue(isinstance(B, BBox))
@@ -79,7 +79,7 @@ def testPassArray(self):
def testPassArray2(self):
# same data type -- should be a view
- A = N.array( (((0,0),(5,5))), N.float_ )
+ A = N.array( (((0,0),(5,5))), N.float64 )
C = asBBox(A)
A[0,0] = -10
self.assertTrue(C[0,0] == A[0,0])
@@ -341,7 +341,7 @@ def testCreate(self):
Pts = N.array( ((5,2),
(3,4),
(1,6),
- ), N.float_ )
+ ), N.float64 )
B = fromPoints(Pts)
#B = BBox( ( (1.0, 2.0), (5.0, 10.0) ) )
self.assertTrue(B[0,0] == 1.0 and
@@ -362,7 +362,7 @@ def testCreateInts(self):
)
def testSinglePoint(self):
- Pts = N.array( (5,2), N.float_ )
+ Pts = N.array( (5,2), N.float64 )
B = fromPoints(Pts)
self.assertTrue(B[0,0] == 5.0 and
B[0,1] == 2.0 and

View File

@ -1,6 +1,4 @@
<multibuild>
<package>python3</package>
<package>python310</package>
<package>python311</package>
<package>python312</package>
<package>python313</package>

File diff suppressed because it is too large Load Diff

27
python-3.13.1.patch Normal file
View File

@ -0,0 +1,27 @@
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
}};
class {ListClass}

View File

@ -1,3 +1,69 @@
-------------------------------------------------------------------
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>
- Add patch python-3.13.1.patch to fix tests with Python 3.13.1
- Factory is not built on Python 3.10 anymore
-------------------------------------------------------------------
Sun Nov 17 13:31:39 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Disable python3 (=3.6) flavor for 15.X
* Upstream only supports Python 3.7+
* Requires sip 6.8 which only supports Python 3.8+
-------------------------------------------------------------------
Thu Nov 7 17:09:23 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Add CVE-2024-50602-no-crash-XML_ResumeParser.patch fixing a
crash in the vendored libexpats XML_ResumeParser function
(bsc#1232590, CVE-2024-50602).
-------------------------------------------------------------------
Fri Oct 4 11:02:43 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 4.2.2:
+ Fix some Python 3.12 compatibility issues (segfault on exit) by upgrading sip & waf
+ Fix more float/int conversion issues in wx.lib classes
+ Add initialValue argument to wx.lib.DirBrowseButton
+ Fix wxImage.Clear()
+ Fix blurry text in AuiNotebook tab
+ Add support for frozen rows and columns to GridWithLabelRenderersMixin
+ demo: ShortcutEditor: Fix broken call GetMenuBar()
+ Add proper support for DataViewCheckIconTextRenderer
+ Build: Use new tarfile.extractall() filter for safer tarfile extraction
+ Fix typo in wx.lib.agw.persist_handlers
+ Fix 'str' to 'wxString' converstation, when emoji is inside string
+ Use unwrap before isbuiltin check
+ Preserve pane icons when loading a perspective in agw.aui
+ wx.agw.aui: don't uninitialize the AuiManager if the window close event is vetoed
+ Pure python AUI: Make behavior in all platforms more equal
+ wx.agw.aui. Do layout as the last step after all pane infos have recomputed their best sizes
+ Fix additional SyntaxWarnings with Python 3.12
+ Fix wx.lib.agw.ribbon.RibbonButtonBar DeleteButton function
+ UltimateListCtrl: Add support for ULC_AUTO_CHECK_PARENT
+ Remove dependency on distutils
+ Improve wx.lib.agw.FlatMenu memory usage
+ Support NumPy 2.0
+ Fix EditLabel on CustomTreeCtrl doesn't automatically select the entire text
+ Fix Widgets placed in the UltimateListControl are drawn in the wrong location
+ Fix wx.lib.agw.aui sometimes shows "ghost" docking guide
+ Fix Thumbnailctrl SetSelection raises exception if it tries to scroll
- Add python-six BuildRequires: needed for the test suite.
- Drop upstream merged patches:
+ 0001-Update-wxTextCtrl-OSX-overrides-since-they-re-now-do.patch
+ 0001-Handle-wxGLCanvas-CreateSurface-which-is-only-availa.patch
+ 0001-Support-building-with-Doxygen-1.9.7.patch
+ 0001-wxWidgets-Phoenix-integer-division.patch
+ 0003-Make-pip-usage-in-wxget-optional.patch
+ require-numpy.patch
+ drop-py2.patch
+ Phoenix-pr2580+2591+2592-numpy2.patch
-------------------------------------------------------------------
Thu Aug 29 13:57:46 UTC 2024 - Ben Greiner <code@bnavigator.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-wxPython
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -19,9 +19,8 @@
%define X_display ":98"
%bcond_without test
%bcond_without syswx
# We rebuild the ETG and SIP files for two reasons:
# We rebuild the ETG and SIP files for:
# - Fixing a bug in the ETG time_t typedef (see patch)
# - Compatibility with SIP 6.5.x, for Leap 15.x
%bcond_without rebuild_sip
%if %{with syswx}
@ -59,18 +58,12 @@ ExclusiveArch: donotbuild
%endif
%else
# SLE/Leap
%if "%flavor" == "python3"
# python3 is the old 3.6
%define pythons python3
%define python3_provides %{nil}
%else
%{?sle15_python_module_pythons}
%if "%flavor" != "%pythons"
# sle15_python_module_pythons defines the flavor, otherwise don't build
%define pythons %{nil}
%endif
%endif
%endif
%if "%{shrink:%pythons}" == ""
ExclusiveArch: donotbuild
%define python_module() %flavor-not-enabled-in-buildset-for-suse-%{?suse_version}
@ -85,7 +78,7 @@ ExclusiveArch: donotbuild
%endif
Name: %{pprefix}-wxPython
Version: 4.2.1
Version: 4.2.2
Release: 0
Summary: The "Phoenix" variant of the wxWidgets Python bindings
License: GPL-2.0-or-later
@ -95,29 +88,20 @@ URL: https://github.com/wxWidgets/Phoenix
Source0: wxPython-%{version}.tar.gz
Source1: python-wxPython-rpmlintrc
Source2: repack
Patch1: 0001-Update-wxTextCtrl-OSX-overrides-since-they-re-now-do.patch
Patch2: 0001-Handle-wxGLCanvas-CreateSurface-which-is-only-availa.patch
# PATCH-FIX-UPSTREAM https://github.com/wxWidgets/Phoenix/pull/2497
Patch3: 0001-Support-building-with-Doxygen-1.9.7.patch
# PATCH-FIX-UPSTREAM https://github.com/wxWidgets/Phoenix/pull/2508
Patch4: 0001-wxWidgets-Phoenix-integer-division.patch
# PATCH-FIX-OPENSUSE
Patch12: use_stl_build.patch
# PATCH-FIX-UPSTREAM - https://github.com/wxWidgets/Phoenix/pull/2232
Patch13: 0003-Make-pip-usage-in-wxget-optional.patch
# PATCH-FIX-OPENSUSE
Patch14: 0004-Fix-time_t-ETG-typedef-extend-DateTime.FromTimeT-tes.patch
# PATCH-FIX-UPSTREAM CVE-2024-50602-no-crash-XML_ResumeParser.patch bsc#1232590 mcepl@suse.com
# prevent crashing of vendored libexpat in XML_ResumeParser
Patch15: CVE-2024-50602-no-crash-XML_ResumeParser.patch
# PATCH-FIX-OPENSUSE - Test fixes/additions:
Patch112: 0001-Check-HSV-values-in-image-test.patch
# PATCH-FIX-OPENSUSE - Numpy for Python 3.12 is a thing
Patch113: require-numpy.patch
Patch114: wxwidgets-3.2.5.patch
# PATCH-FIX-UPSTREAM https://github.com/wxWidgets/Phoenix/pull/2540
Patch115: drop-py2.patch
# PATCH-FIX-UPSTREAM https://github.com/wxWidgets/Phoenix/pull/2580 + 2591 + 2592
Patch116: Phoenix-pr2580+2591+2592-numpy2.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}
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: c++_compiler
@ -125,7 +109,7 @@ BuildRequires: fdupes
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
%if %{with syswx}
BuildRequires: %{python_module sip6-devel >= 6.5.1}
BuildRequires: %{python_module sip6-devel >= 6.8.3}
BuildRequires: waf
BuildRequires: wxGTK3-devel >= 3.2.0
BuildRequires: wxWidgets-3_2-doc-xml >= 3.2.0
@ -166,6 +150,7 @@ BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest-forked}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module six}
BuildRequires: Mesa-dri
# Need at least one font installed
BuildRequires: google-opensans-fonts

View File

@ -1,11 +0,0 @@
Revert https://github.com/wxWidgets/Phoenix/commit/b1c55639dfb73db3a11307c9de888540cec512df
--- a/requirements/install.txt 2023-06-07 01:31:16.000000000 +0000
+++ b/requirements/install.txt 2024-01-06 22:08:26.485981672 +0000
@@ -1,5 +1,4 @@
# Runtime dependencies needed when using wxPython Phoenix
-numpy < 1.17 ; python_version <= '2.7'
-numpy ; python_version >= '3.0' and python_version < '3.12'
+numpy
pillow
six

BIN
wxPython-4.2.1.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
wxPython-4.2.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -4,11 +4,13 @@ Generated by:
git diff 5622abb73deaa26dc2f6dc4cd8b4b2050396b49a..78938da1218483024b3a7acf55b5fb5513882916 etg/
diff --git etg/window.py etg/window.py
index c388df76..0c035f14 100644
---
etg/window.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
--- a/etg/window.py
+++ a/etg/window.py
@@ -251,6 +251,23 @@ def run():
+++ b/etg/window.py
@@ -268,6 +268,23 @@ def run():
return NULL;
#endif
""")