734 Commits

Author SHA1 Message Date
Scott Talbert
b671bef2ab Fix a few numpy renames missed in 95cafd1 2025-02-09 22:12:37 -05:00
Edouard Choinière
95cafd1a3f style: Normalise numpy imports with import numpy as np
The convention when importing numpy is to use `import numpy as np`

Fixes: unconventional-import-alias (ICN001)
Ruff rule: https://docs.astral.sh/ruff/rules/unconventional-import-alias/
2025-02-08 16:48:57 +00:00
Scott Talbert
bb35bcd9d9 Fix bugs in Python2 / six removal 2025-02-03 20:13:56 -05:00
Alexandre Detiste
0257f755cf remove most of Python2 compatibility code 2025-02-02 20:17:45 -05:00
Steve Kowalik
b1d5cb708c 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. Also replace uses of float_ with float64.
2024-08-30 10:19:22 +10:00
Ben Greiner
3b042c863f integer division for randint
Python 3.12 does not accept floats for random.randint() anymore
2024-01-06 21:58:29 +01:00
Scott Talbert
74e34c7a2c Merge pull request #2425 from konstantinbo/fix-dataviewcheckicontextrenderer
Fix dataviewcheckicontextrenderer
2023-07-14 17:09:41 -04:00
Scott Talbert
db2cef94d0 Set missing pyInt on wxImage.Clear
Fixes #2433.
2023-07-06 12:47:27 -04:00
Konstantin Bolshakov
d49c6934cf Added unittest for DataViewCheckIconTextRenderer and DataViewCheckIconText 2023-06-27 14:07:21 +02:00
Scott Talbert
d8c8e9e4c7 Implement wrapping for wx.ThreadEvent
Fixes #2338.
2023-02-04 20:41:53 -05:00
Stefan Brüns
88b8565654 Fix overflow check for wxUIntPtr type
long is 32bit on 32-bit archs and on Win64 (see
https://en.cppreference.com/w/cpp/language/types ). As SIP uses
PyLong_AsLongLong internally and uses an extra bounds check only if
explicitly enabled("sip.enableoverflowchecking(True)"), the overflow
only triggers when it also overflows `long long`, i.e. when
_LONG_MAX == _LLONG_MAX.
2022-08-14 01:30:33 +02:00
Scott Talbert
46f1c1759f Update wxWidgets to 3.1.7 2022-06-08 14:44:47 -07:00
DietmarSchwertberger
b33ede2106 support EVT_GRID_ROW_MOVE 2022-06-08 21:04:37 +02:00
Robin Dunn
0a771ad404 Transfer ownership in wx.BitmapBundle.FromImpl
Add unittest for wx.BitmapBundleImpl
2022-05-17 18:48:46 -07:00
Robin Dunn
42c0da6d86 Merge pull request #2163 from wxWidgets/bmp-bundle
Autoconvert to wx.BitmapBundle
2022-05-17 17:26:42 -07:00
Robin Dunn
323129f449 Adjust all the custom wx.MenuItem methods. Return new instances, mark them as factories, etc. 2022-05-17 17:23:58 -07:00
Robin Dunn
56b790f50b Add a couple more tests for wx.BitmapBundle 2022-05-16 15:28:02 -07:00
Randy Döring
61cb3244d4 Fix CheckListBox GetSelections() 2022-05-06 12:30:03 +02:00
Scott Talbert
37ba9563b6 Update unittests to work with wxWidgets 3.1.6 2022-05-02 22:35:18 -04:00
Scott Talbert
2871c46d33 Fix a bunch of DeprecationWarnings due to invalid escape sequences
Fixes #1454.
2022-01-11 11:23:06 -05:00
Scott Talbert
43ad05af4f Merge pull request #2071 from swt2c/test_fixes_2021
Fix a bunch of test issues on GTK and OSX, plus a few non-test bugs
2022-01-09 10:11:07 -05:00
Scott Talbert
8fc9c03ac8 tests: skip test_gdicmn test that currently fails 2022-01-02 13:53:16 -05:00
Scott Talbert
1b1bccdb60 tests: fix uiaction tests by adding delay 2022-01-02 13:53:09 -05:00
Scott Talbert
174d606385 Add tests for TaskBarIcon CreatePopupMenu and GetPopupMenu overrides 2022-01-01 17:24:37 -05:00
Scott Talbert
f60284fe64 tests: fixup test_frame on wxGTK 2021-12-30 17:40:24 -05:00
Scott Talbert
ecb6682c65 tests: Replace deprecated calls/properties in test_platinfo 2021-12-30 16:35:38 -05:00
Scott Talbert
d97581c614 tests: Replace deprecated call in test_menu 2021-12-30 16:27:33 -05:00
Scott Talbert
6b386d85a7 tests: replace deprecated calls in XRC 2021-12-30 15:57:34 -05:00
Scott Talbert
9337a8d257 tests: Replace deprecated numpy float and unittest calls in floatcanvas 2021-12-30 14:59:38 -05:00
Scott Talbert
7d1c8d44e0 tests: fix AGW ThumbnailCtrl tests 2021-12-30 13:59:30 -05:00
Scott Talbert
a503de821f tests: use a currently used string for intl test 2021-12-30 13:44:25 -05:00
Scott Talbert
076b41103e Fix a few wx.Grid event issues / tests 2021-12-30 11:51:24 -05:00
Scott Talbert
8b73673071 tests: use 24-bit color on GLCanvas since Create now asserts 2021-12-30 11:49:38 -05:00
Scott Talbert
970fae9978 Delay on graphics test 2021-12-30 11:48:53 -05:00
Scott Talbert
ea4f48289a Extend delays on FileCtrl tests 2021-12-30 11:48:11 -05:00
Scott Talbert
032ea05d7f Fix Python 3.10 issue with test_cmndata 2021-12-30 11:44:52 -05:00
Robin Dunn
66ec80bd21 Merge branch 'master' into update-wx 2021-12-15 18:59:03 -08:00
Robin Dunn
a843ed14f2 Merge pull request #2014 from arjones6/master
Add wxDC.DrawLinesFromBuffer to draw directly from numpy array memory using the Buffer protocol
2021-12-15 18:55:41 -08:00
arjones6
efbea6a275 dc.DrawLinesFromBuffer demo and test to intc data type. Updated documentation. 2021-12-15 11:07:18 -05:00
arjones6
232542ba3e dc.DrawLinesFromBuffer test and demo added 2021-12-14 12:47:55 -05:00
Robin Dunn
9627bb8035 Merge branch 'master' into update-wx 2021-12-13 21:40:18 -08:00
Robin Dunn
3d45e62b0e Merge pull request #2029 from swt2c/fix_unbind_outorder
Fix unbinding of events in FIFO order
2021-12-13 20:44:03 -08:00
Scott Talbert
b143cff821 Fix unbinding of events in FIFO order
When binding events to multiple methods and then unbinding them later,
in the same order they were bound, the wrong method would get unbound.

For example:
    self.btn.Bind(wx.EVT_BUTTON, self.onButton1)
    self.btn.Bind(wx.EVT_BUTTON, self.onButton1)
followed by:
    self.btn.Unbind(wx.EVT_BUTTON, handler=self.onButton2)
    self.btn.Unbind(wx.EVT_BUTTON, handler=self.onButton1)
works, but the reverse fails:
    self.btn.Unbind(wx.EVT_BUTTON, handler=self.onButton1)
    self.btn.Unbind(wx.EVT_BUTTON, handler=self.onButton2)

The reason is that the wxPython Disconnect() method called the wxWidgets
Disconnect() method with the userData parameter set to NULL.  In this
case, wxWidgets performs no filtering based on the userData parameter
and this could result in the wrong handler getting disconnected.

Fix this by setting the userData to a known value before calling
wxWidgets Disconnect() method so that it will disconnect the correct
handler.

This commit also adds a test that verifies the fix.

Fixes #2027.
2021-11-17 19:28:54 -05:00
Christian Clauss
25ba122168 Fix typos discovered by codespell 2021-08-07 18:55:49 +02:00
Robin Dunn
70535a722b remove wx.webkit 2021-07-24 15:59:37 -07:00
Robin Dunn
3d4155395b Add test cases for GenericDirCtrl.GetPath and GetPaths 2021-01-19 10:07:50 -08:00
Robin Dunn
c4f1e9f3bd Add missing context manager methods for wx.LogNull 2020-11-10 14:43:18 -08:00
Stefan Brüns
cf30fc3e17 Remove test for default-constructed wxPGWindowList, use Getters
The default constructor has been removed in wxWidgets 3.1.4, commit
https://github.com/wxWidgets/wxWidgets/commit/f2f9cbe61960
"(Get rid of unused wxPGWindowList ctor").

Now, at least the primary is required, the secondary is defaulted.

The members are no longer public in the interface.
2020-10-04 18:53:21 +02:00
Stefan Brüns
83e1470f25 Remove pagebreak array from HtmlDCRenderer::Render parameters
The Render call was changed in
https://github.com/wxWidgets/wxWidgets/commit/e01892c669748065
("Split and simplify wxHtmlDCRenderer::Render()")
2020-10-02 20:54:31 +02:00
Stefan Brüns
dab4757525 Remove tests for removed OS/2 list states, and invalid hittest case
These states were OS/2 specific and have been removed:
https://github.com/wxWidgets/wxWidgets/commit/01f9accd19755fdc
("Remove wxPM, wxWidgets port to OS/2.")

ONITEMRIGHT is only meaningfull for trees, and was removed from the
interface:
https://github.com/wxWidgets/wxWidgets/commit/6c9b3a825407b362
("Improved wxListCtrl::HitTest() docs")
2020-10-02 20:42:54 +02:00