Just tried it. Some of the warnings are in the wx library itself, e.g. in wx.py.frame.
I googled to find wxWidgets: Window IDs.
It looks like wx.Window.NewControlId is the replacement. Although that one returns negative numbers, whereas NewId returns positive numbers, but I think that only makes a difference if you use hardwired literal constant ID's, which you shouldn't do anyway.
Robin, please keep wx.NewId and remove the deprecation, adding a forwarding implementation when it becomes necessary.
NewId calls are ubiquitous. You don't remove something like that, unless there's a hard technical need, or it's some sort of really badly named bug magnet, and wx.NewId is neither.
One of the changes in this release is that anything that is marked as deprecated in the wxWidgets interface is now automatically marked as deprecated for wxPython as well. The initial reason for this is that most of them are being permanently removed in 4.1, but there are other good reasons as well. It will make runtime behavior match the documentation, (“Why does it say deprecated in the documentation but doesn’t raise a deprecation warning?”) and also to conform to one of Phoenix’s design goals of reducing the divergence between wxWidgets and wxPython.
If the change really rubs you the wrong way then you can always monkey-patch in a new implementation of NewId into wx in your applications.
···
On Monday, June 18, 2018 at 5:06:56 AM UTC-7, Anders Munch wrote:
Marco Prosperi:
I get a lot of deprecation warning about NewId.
Just tried it. Some of the warnings are in the wx library itself, e.g. in wx.py.frame.
It looks like wx.Window.NewControlId is the replacement. Although that one returns negative numbers, whereas NewId returns positive numbers, but I think that only makes a difference if you use hardwired literal constant ID’s, which you shouldn’t do anyway.
Robin, please keep wx.NewId and remove the deprecation, adding a forwarding implementation when it becomes necessary.
NewId calls are ubiquitous. You don’t remove something like that, unless there’s a hard technical need, or it’s some sort of really badly named bug magnet, and wx.NewId is neither.