Release against wx3.3.3?

If you look at the changes, most are bug fixes applied to 3.2.11 and 3.3.3 alike. There does not seem to be a lot of signature changes happening at this stage.

I still have a list of changes I had planned to do before the next release, but perhaps there’s not a reason to wait on those. We can do a 4.3.0 release relatively soon I suppose? It will of course be a development release (ie, with wxWidgets odd release).

1 Like

That would be fantastic for me! I need to move with the 3.3.3 tag, just because it has fixes that prevent my plug-in from crashing. Hopefully an early release wouldn’t break the development schedule, or cause any issues down the road.

v4.3.0 has been released :slight_smile:

2 Likes

I just updated wxPython in a venv on Linux Mint which completed without errors.

However, I found my applications that import wx.richtext are crashing:

(main-venv) richardt@Camelot:~/Development/python/virtual-envs $ python3
Python 3.12.3 (main, Jun 19 2026, 12:46:00) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> import wx.richtext as rt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/richardt/Development/python/virtual-envs/main-venv/lib/python3.12/site-packages/wx/richtext.py", line 17, in <module>
    from ._richtext import *
ImportError: libwx_baseu_xml-3.3.so.3: cannot open shared object file: No such file or directory

Presumably you built the wheel yourself and didn’t install one of the prebuilt Linux wheels?

Yes:

(main-venv) richardt@Camelot:~/Development/python/virtual-envs $ pip install --upgrade wxpython
Requirement already satisfied: wxpython in ./main-venv/lib/python3.12/site-packages (4.2.5)
Collecting wxpython
  Downloading wxpython-4.3.0.tar.gz (64.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.1/64.1 MB 3.8 MB/s  0:00:16
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: wxpython
  Building wheel for wxpython (pyproject.toml) ... done
  Created wheel for wxpython: filename=wxpython-4.3.0-cp312-cp312-linux_x86_64.whl size=173792855 sha256=f432f12ed52c856bbaf341d11f4ed0d3601eb59ef724631dce7337490631b69f
  Stored in directory: /home/richardt/.cache/pip/wheels/7c/de/44/f6960730e0824e2af6fe3b40dfae45edff2c003f3274d20bd6
Successfully built wxpython
Installing collected packages: wxpython
  Attempting uninstall: wxpython
    Found existing installation: wxPython 4.2.5
    Uninstalling wxPython-4.2.5:
      Successfully uninstalled wxPython-4.2.5
Successfully installed wxpython-4.3.0

Can you attach that built wheel so I can take a look at it?

Never mind, I can reproduce the problem :frowning:

We really need unittests to be run in CI. :frowning:

I use wxPython 4.3.0 on Windows 11 with Python 3.11

I use the following code:

import wx
import wx.propgrid as pg

class FontfacenameMonoProperty(pg.EnumProperty):
    """Select the facename of a monospaced font"""

    def __init__(self, label=pg.PG_LABEL, name=pg.PG_LABEL, value=None):
        ...

It crashes with the following exception:

Traceback (most recent call last):
  File 
...
  File "C:\Users\...\control\propgrid.py", line 12, in FontfacenameMonoProperty
    def __init__(self, label=pg.PG_LABEL, name=pg.PG_LABEL, value=None):
                             ^^^^^^^^^^^
AttributeError: module 'wx.propgrid' has no attribute 'PG_LABEL'
OnInit returned false, exiting...

All the best
Eigi

Thanks for the v4.3.0 build!

Has the handling of colour names passed as strings been changed in 4.3.0?

Using this simple example:

import wx

class MyFrame(wx.Frame):
    def __init__(self):
        wx.Frame.__init__(self, None)
        self.SetSize((400, 300))
        self.SetTitle("Named Colour")
        self.main_panel = wx.Panel(self, wx.ID_ANY)
        self.main_panel.SetBackgroundColour("Dark Red")
        self.Layout()

if __name__ == "__main__":
    app = wx.App()
    frame = MyFrame()
    frame.Show()
    app.MainLoop()

Using wxPython 4.2.5 gtk3 (phoenix) wxWidgets 3.2.9 + Python 3.12.3 + Linux Mint 22.3 gives this:

Using wxPython 4.3.0 gtk3 (phoenix) wxWidgets 3.3.3 + Python 3.12.3 + Linux Mint 22.3 gives this:

@RichardT setting colours by name still seems to work. β€œDark Red” is a colour that is added in by wxPython. Not sure why the custom colours are not making it in, but can you please file an issue. Tracking issues in this thread is getting a little unwieldy. :slight_smile:

I plan to do a quick follow-up release to fix the wx.richtext and pg.PG_LABEL issues though.

2 Likes

Thanks for your reply Scott. I’m afraid I no longer have a GitHub account following a disagreement with them.

OK I filed one for you:

1 Like

Just checked the wxPython 4.3.1 release. All my wxPython apps are working again.
Thank you very much.
Eigi

I found another minor issue: For the wx.LogRecordInfo object the timestamp property is no longer available. It is still listed in the documentation. Will it come back or do I have to adjust my code?
Shall I file an issue on GitHub for this?

Best
Eigi

I can confirm that wx.richtext imports OK with 4.3.1 on Linux Mint.

I have discovered another problem with named colours. Unlike the first problem I posted above, this one raises an exception. It involves setting a style foreground colour (as a string) in an STC. This is a technique that I have been using successfully through many versions of wxPython up to and including 4.2.5.

Here is a cut down example that demonstrates the problem:

import wx
import wx.stc as stc

ALL_STYLES = (
    "Black", "Blue", "Red", "Dark Red", "Forest Green", "Dark Turquoise", 
    "Purple", "Brown", "Medium Forest Green", "Medium Orchid", "Medium Slate Blue",   
    "Medium Turquoise", "Orange", "Lime Green", "Yellow", "Dark Grey"
)

class CustomSTC(stc.StyledTextCtrl):
    def __init__(self, parent, id):
        stc.StyledTextCtrl.__init__(self, parent, id)
        self.SetReadOnly(True)
        self.SetMarginWidth(1, 0)
        self.SetUseHorizontalScrollBar(0)
        for i, fg in enumerate(ALL_STYLES):
            print(i, fg)
            self.StyleSetForeground(i, wx.Colour(fg))

class TestFrame(wx.Frame):
    def __init__(self):
        wx.Frame.__init__(self, None)
        self.SetSize((400, 300))
        self.SetTitle("Test STC Styles")
        self.custom_stc = CustomSTC(self, wx.ID_ANY)
        main_sizer = wx.BoxSizer(wx.VERTICAL)
        main_sizer.Add(self.custom_stc, 1, wx.EXPAND, 0)
        self.SetSizer(main_sizer)
        self.Layout()

if __name__ == "__main__":
    app = wx.App()
    frame = TestFrame()
    frame.Show()
    app.MainLoop()

Using 4.2.5, it outputs the following to stdout and the frame is displayed:

(main-venv) richardt@Camelot:~/.../wxpython/styled_text_ctrl/bug_with_wxpython-4.3.0 $ py CustomSTC_2.py 
0 Black
1 Blue
2 Red
3 Dark Red
4 Forest Green
5 Dark Turquoise
6 Purple
7 Brown
8 Medium Forest Green
9 Medium Orchid
10 Medium Slate Blue
11 Medium Turquoise
12 Orange
13 Lime Green
14 Yellow
15 Dark Grey

Using 4.3.1, it outputs the following and the frame is not displayed:

(main-venv) richardt@Camelot:~/.../wxpython/styled_text_ctrl/bug_with_wxpython-4.3.0 $ py CustomSTC_2.py 
0 Black
1 Blue
2 Red
3 Dark Red
Traceback (most recent call last):
  File "/home/richardt/Development/python/exp/hci/wxpython/styled_text_ctrl/bug_with_wxpython-4.3.0/CustomSTC_2.py", line 35, in <module>
    frame = TestFrame()
            ^^^^^^^^^^^
  File "/home/richardt/Development/python/exp/hci/wxpython/styled_text_ctrl/bug_with_wxpython-4.3.0/CustomSTC_2.py", line 27, in __init__
    self.custom_stc = CustomSTC(self, wx.ID_ANY)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/richardt/Development/python/exp/hci/wxpython/styled_text_ctrl/bug_with_wxpython-4.3.0/CustomSTC_2.py", line 20, in __init__
    self.StyleSetForeground(i, wx.Colour(fg))
wx._core.wxAssertionError: C++ assertion "IsOk()" failed at /tmp/pip-install-ir_u_xex/wxpython_c0143a2b1426455bb3ce6af032621d3a/ext/wxWidgets/src/gtk/colour.cpp(182) in Red(): invalid colour

It is failing on the first colour name containing a space character.

@RichardT I suspect this is the same root issue as it seems that it’s β€œDark Red” where the problem starts.

@Andreas_Eigendorf yes please file an issue.