diff --git a/CHANGES.rst b/CHANGES.rst index 2e03917c..a57a506a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -29,7 +29,11 @@ New and improved stuff in this release: Other changes in this release: -* +* Many of the deprecated items in wxWidgets and wxPython are being or have + been removed. Be sure to test your code in 4.0.2 or a later 4.0.x release + with warnings enabled so you can see which class, method or function calls + you need to change. + diff --git a/docs/sphinx/itemToModuleMap.json b/docs/sphinx/itemToModuleMap.json index 988b93cb..0f087ad7 100644 --- a/docs/sphinx/itemToModuleMap.json +++ b/docs/sphinx/itemToModuleMap.json @@ -815,7 +815,7 @@ "DirProperty":"wx.propgrid.", "DirSelector":"wx.", "DirSelectorPromptStr":"wx.", -"Direction":"wx.", +"Direction":"wx.DataObject.", "DisableAsserts":"wx.", "Display":"wx.", "DisplayChangedEvent":"wx.", diff --git a/etg/artprov.py b/etg/artprov.py index 48017c68..6e19aabe 100644 --- a/etg/artprov.py +++ b/etg/artprov.py @@ -49,8 +49,8 @@ def run(): c.find('GetBitmap').mustHaveApp() c.find('GetIcon').mustHaveApp() + # deprecated and removed c.find('Insert').ignore() - c.addPyCode("ArtProvider.Insert = wx.deprecated(ArtProvider.PushBack, 'Use ArtProvider.PushBack instead')") # Change the types of the art constants from wxString to const char* # since that is what they really are. diff --git a/etg/combo.py b/etg/combo.py index 7579bd3a..987ad909 100644 --- a/etg/combo.py +++ b/etg/combo.py @@ -60,11 +60,9 @@ def run(): c.find('SetSelection.from').name = 'frm' + # deprecated and removed c.find('GetTextIndent').ignore() c.find('SetTextIndent').ignore() - c.addPyCode("ComboCtrl.GetTextIndent = wx.deprecated(ComboCtrl.GetMargins, 'Use GetMargins instead.')") - c.addPyCode("ComboCtrl.SetTextIndent = wx.deprecated(ComboCtrl.SetMargins, 'Use SetMargins instead.')") - #----------------------------------------------------------------- tools.doCommonTweaks(module) diff --git a/etg/event.py b/etg/event.py index 570a4d35..ebc03618 100644 --- a/etg/event.py +++ b/etg/event.py @@ -577,8 +577,9 @@ def run(): #--------------------------------------- # wxIconizeEvent c = module.find('wxIconizeEvent') + + # deprecated and removed c.find('Iconized').ignore() - c.addPyCode("IconizeEvent.Iconized = wx.deprecated(IconizeEvent.IsIconized, 'Use IsIconized instead')") diff --git a/etg/menu.py b/etg/menu.py index 05af6392..0523751f 100644 --- a/etg/menu.py +++ b/etg/menu.py @@ -170,10 +170,9 @@ def run(): c.addPyProperty('Menus GetMenus SetMenus') + # deprecated and removed c.find('GetLabelTop').ignore() c.find('SetLabelTop').ignore() - c.addPyCode("MenuBar.GetLabelTop = wx.deprecated(MenuBar.GetMenuLabelText, 'Use GetMenuLabelText instead')") - c.addPyCode("MenuBar.SetLabelTop = wx.deprecated(MenuBar.SetMenuLabel, 'Use SetMenuLabel instead')") module.addItem(tools.wxListWrapperTemplate('wxMenuList', 'wxMenu', module)) diff --git a/etg/menuitem.py b/etg/menuitem.py index bbe3f674..ff75025a 100644 --- a/etg/menuitem.py +++ b/etg/menuitem.py @@ -38,18 +38,13 @@ def run(): c.find('SetSubMenu.menu').transfer = True + # deprecated and removed c.find('GetLabel').ignore() c.find('GetName').ignore() c.find('GetText').ignore() c.find('SetText').ignore() c.find('GetLabelFromText').ignore() - c.addPyCode("MenuItem.GetLabel = wx.deprecated(MenuItem.GetItemLabelText, 'Use GetItemLabelText instead')") - c.addPyCode("MenuItem.GetName = wx.deprecated(MenuItem.GetItemLabelText, 'Use GetItemLabelText instead')") - c.addPyCode("MenuItem.GetText = wx.deprecated(MenuItem.GetItemLabel, 'Use GetItemLabel instead')") - c.addPyCode("MenuItem.SetText = wx.deprecated(MenuItem.SetItemLabel, 'Use SetItemLabel instead')") - c.addPyCode("MenuItem.GetLabelFromText = wx.deprecated(MenuItem.GetLabelText, 'Use GetLabelText instead')") - # These are MSW only. Make them be empty stubs for the other ports c.find('GetBackgroundColour').type = 'wxColour*' diff --git a/etg/propgridproperty.py b/etg/propgridproperty.py index d31f9cf6..f8ea6086 100644 --- a/etg/propgridproperty.py +++ b/etg/propgridproperty.py @@ -135,11 +135,9 @@ def run(): c.find('GetEditorDialog').factory = True - + # deprecated and removed c.find('AddChild').ignore() c.find('GetValueString').ignore() - c.addPyCode("PGProperty.AddChild = wx.deprecated(PGProperty.AddPrivateChild, 'Use AddPrivateChild instead')") - c.addPyCode("PGProperty.GetValueString = wx.deprecated(PGProperty.GetValueAsString, 'Use GetValueAsString instead')") #--------------------------------------------------------- diff --git a/etg/sizer.py b/etg/sizer.py index bed628b2..6b33d3bb 100644 --- a/etg/sizer.py +++ b/etg/sizer.py @@ -94,8 +94,8 @@ def run(): # Needs wxWin 2.6 compatibility c.find('Remove').findOverload('(wxWindow *window)').ignore() + # deprecated and removed c.find('SetVirtualSizeHints').ignore() - c.addPyCode("Sizer.SetVirtualSizeHints = wx.deprecated(Sizer.FitInside, 'Use FitInside instead')") c.addPyMethod('AddMany', '(self, items)', doc="""\ diff --git a/etg/utils.py b/etg/utils.py index db258a1b..3a89993c 100644 --- a/etg/utils.py +++ b/etg/utils.py @@ -63,8 +63,8 @@ def run(): module.find('wxSetDisplayName').ignore() module.find('wxPostDelete').ignore() + # deprecated and removed module.find('wxUsleep').ignore() - module.addPyCode("Usleep = deprecated(MilliSleep, 'Use MilliSleep instead.')") # ignore all the environment related functions