Compare commits
73 Commits
Author | SHA256 | Date | |
---|---|---|---|
5cb61ad3d7 | |||
f554308e36 | |||
9573010936 | |||
4b7ed0c956 | |||
cd34ff9c3d | |||
23d557738b | |||
b001c36e5d | |||
95c0b74b4f | |||
d1d6fba381 | |||
b6b05a1bb9 | |||
5bd36393be | |||
47aaf0661c | |||
856a9169d7 | |||
28c8e1af41 | |||
1f059e8999 | |||
e0e3d220a2 | |||
2955e5c25f | |||
1db51c6a2a | |||
7b5ab36eac | |||
ff702d0ccb | |||
694792d0fd | |||
1bff958f0b | |||
d965af1b18 | |||
7cf39611fe | |||
c5aed123df | |||
1ec08ac40f | |||
6adaad09e4 | |||
e96b2617c7 | |||
56faf98414 | |||
27680c1653 | |||
ec8117108b | |||
10069f05c2 | |||
6e6d043c2c | |||
4672a21933 | |||
8f8fd9cff5 | |||
31143cb62e | |||
a83a5a8b5e | |||
8d78255baa | |||
854eb87f77 | |||
5620729dc5 | |||
c9e16d2bc3 | |||
c2d36a9a66 | |||
6c22f2ec19 | |||
ff0538714f | |||
8c0a8ddc2f | |||
c038434ed6 | |||
b1d47d43b5 | |||
2933b35bc7 | |||
3592cbe56a | |||
c4b80131f0 | |||
51489fd8be | |||
e5ac9cab0e | |||
55bf174f8c | |||
aa43418f2b | |||
b778ae565a | |||
66f31faeb6 | |||
0f52606181 | |||
8b4cc7c6e5 | |||
b42827617a | |||
4d5b51398c | |||
39da025e3b | |||
1bd8e4b725 | |||
e9a89f6abb | |||
|
a422bd545e | ||
|
cceb18ff26 | ||
|
50e5a438c0 | ||
|
7c91c2e532 | ||
fbc8ef86b9 | |||
|
091834ce21 | ||
|
95b4a26c15 | ||
55e39ba0bd | |||
|
ca4501c3e0 | ||
2d097db282 |
@@ -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
|
|
||||||
|
|
@@ -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):
|
|
@@ -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
|
|
||||||
|
|
@@ -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) )
|
|
@@ -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
|
|
||||||
|
|
@@ -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
|
|
5640
drop-py2.patch
5640
drop-py2.patch
File diff suppressed because it is too large
Load Diff
@@ -1,27 +0,0 @@
|
|||||||
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}
|
|
@@ -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)
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)
BIN
wxPython-4.2.2.tar.gz
(Stored with Git LFS)
Binary file not shown.
Reference in New Issue
Block a user