wx.App.GTKSuppressDiagnostics() not working anymore with python 3.10.4 in RH8

Hello,

A call to wx.App.GTKSuppressDiagnostics() do not remove GTK messages anymore with:
RedHat 8
python 3.10.4
wxPython 4.2.0
wxwidgets 1.0.5

It was working properly using:
RedHat 7
python 3.7.2
wxPython 4.2.0
wxwidgets 1.0.5

Any hints about what is going on ?

app = wx.App(False)
if callable(getattr(wx.App, 'GTKSuppressDiagnostics', None)):
    # available from wxPython 4.2.0 only, removes all useless GTK errors on stdout
    app.GTKSuppressDiagnostics()

Thanks.

The reappearing GTK stuff:
(spyder.py:689809): Gtk-CRITICAL **: 17:42:41.257: gtk_box_gadget_distribute: assertion ‘size >= 0’ failed in GtkScrollbar
(spyder.py:689809): Gtk-CRITICAL **: 17:42:41.257: gtk_box_gadget_distribute: assertion ‘size >= 0’ failed in GtkScrollbar
(spyder.py:689809): Gtk-CRITICAL **: 17:42:41.260: gtk_box_gadget_distribute: assertion ‘size >= 0’ failed in GtkNotebook
(spyder.py:689809): Gtk-WARNING **: 17:42:41.260: Negative content width -2 (allocation 0, extents 1x1) while allocating gadget (node header, owner GtkNotebook)
(spyder.py:689809): Gtk-CRITICAL **: 17:42:41.260: gtk_box_gadget_distribute: assertion ‘size >= 0’ failed in GtkNotebook