Control: tags 758940 + patch I've attached a patch to update spe to use wxPython 3.0.
I did some simple testing of spe with this patch, and it seems to work, but it isn't an application I'm familiar with and it would be good if somebody who habitually uses it could do more in-depth testing. Let me know if you'd like me to NMU this change. Cheers, Olly
diff -Nru spe-0.8.4.h/debian/changelog spe-0.8.4.h/debian/changelog --- spe-0.8.4.h/debian/changelog 2014-08-31 22:15:44.000000000 -0300 +++ spe-0.8.4.h/debian/changelog 2014-08-31 20:46:36.000000000 -0300 @@ -1,3 +1,11 @@ +spe (0.8.4.h-3.1) unstable; urgency=medium + + * Non-maintainer upload. + * Update for wxPython 3.0 (Closes: #758940): + + New patch: wxpython3.0.patch + + -- Olly Betts <o...@survex.com> Sun, 31 Aug 2014 23:42:19 +0000 + spe (0.8.4.h-3) unstable; urgency=low * Team upload. diff -Nru spe-0.8.4.h/debian/control spe-0.8.4.h/debian/control --- spe-0.8.4.h/debian/control 2014-08-31 22:15:44.000000000 -0300 +++ spe-0.8.4.h/debian/control 2014-08-31 20:41:38.000000000 -0300 @@ -15,12 +15,12 @@ Architecture: all Depends: ${python:Depends}, ${misc:Depends}, - python-wxgtk2.8, + python-wxgtk3.0, python-wxglade, kiki, winpdb, pychecker (>= 0.8.17-5) -Recommends: wx2.8-doc +Recommends: wx3.0-doc Suggests: blender (>= 2.35), python-doc, python-wxtools Description: Stani's Python Editor Spe is a Python IDE with auto-indentation, auto completion, call diff -Nru spe-0.8.4.h/debian/patches/series spe-0.8.4.h/debian/patches/series --- spe-0.8.4.h/debian/patches/series 1969-12-31 21:00:00.000000000 -0300 +++ spe-0.8.4.h/debian/patches/series 2014-08-31 20:55:48.000000000 -0300 @@ -0,0 +1 @@ +wxpython3.0.patch diff -Nru spe-0.8.4.h/debian/patches/wxpython3.0.patch spe-0.8.4.h/debian/patches/wxpython3.0.patch --- spe-0.8.4.h/debian/patches/wxpython3.0.patch 1969-12-31 21:00:00.000000000 -0300 +++ spe-0.8.4.h/debian/patches/wxpython3.0.patch 2014-08-31 21:08:31.000000000 -0300 @@ -0,0 +1,330 @@ +Description: Update for wxPython 3.0 +Author: Olly Betts <o...@survex.com> +Bug-Debian: https://bugs.debian.org/758940 +Forwarded: no +Last-Update: 2014-08-31 + +Index: spe-0.8.4.h/_spe/Child.py +=================================================================== +--- spe-0.8.4.h.orig/_spe/Child.py ++++ spe-0.8.4.h/_spe/Child.py +@@ -390,7 +390,7 @@ Please try then to change the encoding o + dlg = wx.FileDialog(self, "Save As - www.stani.be", + defaultDir = defaultDir, + wildcard = info.WILDCARD, +- style = wx.SAVE|wx.OVERWRITE_PROMPT|wx.CHANGE_DIR) ++ style = wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT|wx.FD_CHANGE_DIR) + if dlg.ShowModal() == wx.ID_OK: + path = dlg.GetPaths()[0] + self.save(path) +@@ -406,7 +406,7 @@ Please try then to change the encoding o + dlg = wx.FileDialog(self, "Save a Copy - www.stani.be", + defaultDir = defaultDir, + wildcard = info.WILDCARD, +- style = wx.SAVE|wx.OVERWRITE_PROMPT|wx.CHANGE_DIR) ++ style = wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT|wx.FD_CHANGE_DIR) + if dlg.ShowModal() == wx.ID_OK: + path = dlg.GetPaths()[0] + try: +@@ -486,7 +486,7 @@ Please try then to change the encoding o + #defaultDir = os.getcwd(), + #defaultFile = "", + wildcard = "Python source (*.py)|*.py|Text (*.txt)|*.txt|All files (*.*)|*.*", +- style = wx.OPEN | wx.FILE_MUST_EXIST ++ style = wx.FD_OPEN | wx.FD_FILE_MUST_EXIST + ) + answer = dlg.ShowModal() + signature = dlg.GetPath() +Index: spe-0.8.4.h/_spe/Parent.py +=================================================================== +--- spe-0.8.4.h.orig/_spe/Parent.py ++++ spe-0.8.4.h/_spe/Parent.py +@@ -430,7 +430,7 @@ class Panel(wx.Notebook): + dlg = wx.FileDialog(self, "Choose a file - www.stani.be", + defaultDir=defaultDir, defaultFile="", + wildcard=info.WILDCARD, +- style=wx.OPEN|wx.MULTIPLE) ++ style=wx.FD_OPEN|wx.FD_MULTIPLE) + if dlg.ShowModal() == wx.ID_OK: + fileList = dlg.GetPaths() + if fileList and self.app.children: +@@ -449,7 +449,7 @@ class Panel(wx.Notebook): + dlg = wx.FileDialog(self, "Choose a file - www.stani.be", + defaultDir=defaultDir, defaultFile="", + wildcard=info.WORKSPACE_WILDCARD, +- style=wx.OPEN) ++ style=wx.FD_OPEN) + if dlg.ShowModal() == wx.ID_OK: + file = dlg.GetPath() + try: +@@ -479,7 +479,7 @@ class Panel(wx.Notebook): + defaultFile = defaultFile, + defaultDir = info.dirname(defaultFile), + wildcard = info.WORKSPACE_WILDCARD, +- style = wx.SAVE|wx.OVERWRITE_PROMPT|wx.CHANGE_DIR) ++ style = wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT|wx.FD_CHANGE_DIR) + if dlg.ShowModal() == wx.ID_OK: + file = dlg.GetPath() + try: +Index: spe-0.8.4.h/_spe/SPE.py +=================================================================== +--- spe-0.8.4.h.orig/_spe/SPE.py ++++ spe-0.8.4.h/_spe/SPE.py +@@ -5,15 +5,14 @@ if sys.platform.startswith('win') and sy + from cStringIO import StringIO + sys.stdout = StringIO() + +-MIN_WX_VERSION = '2.5.4.1' ++MIN_WX_VERSION = '2.8' + GET_WXPYTHON = 'Get it from http://www.wxpython.org!' + + try: + import wxversion +- if sys.modules.has_key('wx') or sys.modules.has_key('wxPython'): ++ if sys.modules.has_key('wx'): + pass#probably not the first call to this module: wxPython already loaded + else: +- #wxversion.select('2.6') + wxversion.ensureMinimal(MIN_WX_VERSION) + except ImportError: + #the old fashioned way as not everyone seems to have wxversion installed +Index: spe-0.8.4.h/_spe/dialogs/helpShortcutsDialog.py +=================================================================== +--- spe-0.8.4.h.orig/_spe/dialogs/helpShortcutsDialog.py ++++ spe-0.8.4.h/_spe/dialogs/helpShortcutsDialog.py +@@ -13,7 +13,7 @@ __doc__=INFO['doc']%INFO + import os + + #---Boa generated +-from wxPython.wx import * ++import wx + + def create(parent,path=''): + return wxDialog1(parent,path) +Index: spe-0.8.4.h/_spe/dialogs/preferencesDialog.py +=================================================================== +--- spe-0.8.4.h.orig/_spe/dialogs/preferencesDialog.py ++++ spe-0.8.4.h/_spe/dialogs/preferencesDialog.py +@@ -401,7 +401,7 @@ class Create(wx.Dialog): + def OnBrowseSignature(self, event): # wxGlade: Create.<event_handler> + path=self.Signature.GetValue() + defaultDir, defaultFile = os.path.split(path) +- dlg = wx.FileDialog(self,defaultDir = defaultDir, defaultFile = defaultFile, style = wx.OPEN|wx.DD_NEW_DIR_BUTTON) ++ dlg = wx.FileDialog(self,defaultDir = defaultDir, defaultFile = defaultFile, style = wx.FD_OPEN) + if dlg.ShowModal() == wx.ID_OK: + path = dlg.GetPath() + self.Signature.SetValue(path) +Index: spe-0.8.4.h/_spe/dialogs/runTerminalDialog.py +=================================================================== +--- spe-0.8.4.h.orig/_spe/dialogs/runTerminalDialog.py ++++ spe-0.8.4.h/_spe/dialogs/runTerminalDialog.py +@@ -60,7 +60,6 @@ class RunTerminalDialog(wx.Dialog): + + class MyApp(wx.App): + def OnInit(self): +- wx.InitAllImageHandlers() + dialog = RunTerminalDialog(None, -1, "") + self.SetTopWindow(dialog) + dialog.Show() +Index: spe-0.8.4.h/_spe/dialogs/winpdbDialog.py +=================================================================== +--- spe-0.8.4.h.orig/_spe/dialogs/winpdbDialog.py ++++ spe-0.8.4.h/_spe/dialogs/winpdbDialog.py +@@ -182,7 +182,6 @@ def dialog(parent, name=''): + + if __name__ == "__main__": + app = wx.PySimpleApp(0) +- wx.InitAllImageHandlers() + create = Create(None, -1, "") + app.SetTopWindow(create) + create.Show() +Index: spe-0.8.4.h/_spe/plugins/XRCed/xrced.py +=================================================================== +--- spe-0.8.4.h.orig/_spe/plugins/XRCed/xrced.py ++++ spe-0.8.4.h/_spe/plugins/XRCed/xrced.py +@@ -450,7 +450,7 @@ class Frame(wx.Frame): + def OnOpen(self, evt): + if not self.AskSave(): return + dlg = wx.FileDialog(self, 'Open', os.path.dirname(self.dataFile), +- '', '*.xrc', wx.OPEN | wx.CHANGE_DIR) ++ '', '*.xrc', wx.FD_OPEN | wx.FD_CHANGE_DIR) + if dlg.ShowModal() == wx.ID_OK: + path = dlg.GetPath() + self.SetStatusText('Loading...') +@@ -471,7 +471,7 @@ class Frame(wx.Frame): + else: name = defaultName + dirname = os.path.abspath(os.path.dirname(self.dataFile)) + dlg = wx.FileDialog(self, 'Save As', dirname, name, '*.xrc', +- wx.SAVE | wx.OVERWRITE_PROMPT | wx.CHANGE_DIR) ++ wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT | wx.FD_CHANGE_DIR) + if dlg.ShowModal() == wx.ID_OK: + path = dlg.GetPath() + if isinstance(path, unicode): +@@ -1677,7 +1677,7 @@ class PythonOptions(wx.Dialog): + dirname = os.path.abspath(os.path.dirname(path)) + name = os.path.split(path)[1] + dlg = wx.FileDialog(self, 'Save As', dirname, name, '*.py', +- wx.SAVE | wx.OVERWRITE_PROMPT) ++ wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT) + if dlg.ShowModal() == wx.ID_OK: + path = dlg.GetPath() + self.FileNameTC.SetValue(path) +Index: spe-0.8.4.h/_spe/plugins/kiki/kiki.py +=================================================================== +--- spe-0.8.4.h.orig/_spe/plugins/kiki/kiki.py ++++ spe-0.8.4.h/_spe/plugins/kiki/kiki.py +@@ -703,7 +703,6 @@ def main(): + global settings + settings = Settings(dirname=".kiki", filename="kikicfg.py", debugfile="kikidebug") + Kiki = wx.PySimpleApp() +- wx.InitAllImageHandlers() + mw = MyFrameWithEvents(None, -1, "") + mw.icon() + Kiki.SetTopWindow(mw) +Index: spe-0.8.4.h/_spe/plugins/winpdb/winpdb.py +=================================================================== +--- spe-0.8.4.h.orig/_spe/plugins/winpdb/winpdb.py ++++ spe-0.8.4.h/_spe/plugins/winpdb/winpdb.py +@@ -278,7 +278,7 @@ import sys + + + +-WXVER = "2.6" ++WXVER = "2.8" + + STR_WXPYTHON_ERROR_TITLE = 'Winpdb Error' + STR_WXPYTHON_ERROR_MSG = """wxPython was not found. +@@ -4426,7 +4426,7 @@ class COpenDialog(wx.Dialog): + (_path, filename, args) = rpdb2.split_command_line_path_filename_args(command_line) + _abs_path = os.path.abspath(_path) + +- dlg = wx.FileDialog(self, defaultDir = _abs_path, defaultFile = filename, wildcard = WINPDB_WILDCARD, style = wx.OPEN | wx.CHANGE_DIR) ++ dlg = wx.FileDialog(self, defaultDir = _abs_path, defaultFile = filename, wildcard = WINPDB_WILDCARD, style = wx.FD_OPEN | wx.FD_CHANGE_DIR) + r = dlg.ShowModal() + if r == wx.ID_OK: + path = dlg.GetPaths()[0] +@@ -4520,7 +4520,7 @@ class CLaunchDialog(wx.Dialog): + + cwd = os.getcwdu() + +- dlg = wx.FileDialog(self, defaultDir = _abs_path, defaultFile = filename, wildcard = WINPDB_WILDCARD, style = wx.OPEN | wx.CHANGE_DIR) ++ dlg = wx.FileDialog(self, defaultDir = _abs_path, defaultFile = filename, wildcard = WINPDB_WILDCARD, style = wx.FD_OPEN | wx.FD_CHANGE_DIR) + r = dlg.ShowModal() + + os.chdir(cwd) +Index: spe-0.8.4.h/_spe/sm/uml.py +=================================================================== +--- spe-0.8.4.h.orig/_spe/sm/uml.py ++++ spe-0.8.4.h/_spe/sm/uml.py +@@ -195,7 +195,7 @@ class PrintCanvas(ogl.ShapeCanvas): + self, + "Save image as", ".", "", + "|".join(["%s files (*%s)|*%s"%(t.upper(),t,t) for t in fileTypes]), +- wx.SAVE|wx.OVERWRITE_PROMPT ++ wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT + ) + if dlg1.ShowModal() == wx.ID_OK: + fileName = dlg1.GetPath() +Index: spe-0.8.4.h/_spe/sm/wxp/__init__.py +=================================================================== +--- spe-0.8.4.h.orig/_spe/sm/wxp/__init__.py ++++ spe-0.8.4.h/_spe/sm/wxp/__init__.py +@@ -32,7 +32,7 @@ from wx.py import crust,shell, filling + + #---Dialogs + class FileDir: +- def getFile(self,control, style = wx.OPEN|wx.DD_NEW_DIR_BUTTON): ++ def getFile(self,control, style = wx.FD_OPEN): + default = control.GetValue() + if not default: + default = "D:\\" +@@ -43,7 +43,7 @@ class FileDir: + control.SetValue(path) + dlg.Destroy() + +- def getDir(self,control,style=wx.DD_NEW_DIR_BUTTON): ++ def getDir(self,control,style=0): + path = control.GetValue() + if not path: + path = "D:\\" +@@ -58,13 +58,12 @@ class FileDir: + def fileDialog(defaultPath='',defaultFile='',message='www.stani.be', + wildcard = "*.*",open=1,readOnly=1,overwrite=0,multiple=0,changeDir=0): + """Launchs file selector dialog.""" +- style=wx.OPEN +-## if open: style|=wx.OPEN +-## else: style|=wx.SAVE +-## if not readOnly: style|=wx.HIDE_READONLY +-## if not overwrite: style|=wx.OVERWRITE_PROMPT +-## if multiple: style|=wx.MULTIPLE +-## if changeDir: style|=wx.CHANGE_DIR ++ style=wx.FD_OPEN ++## if open: style|=wx.FD_OPEN ++## else: style|=wx.FD_SAVE ++## if not overwrite: style|=wx.FD_OVERWRITE_PROMPT ++## if multiple: style|=wx.FD_MULTIPLE ++## if changeDir: style|=wx.FD_CHANGE_DIR + dlg=wx.FileDialog(None, message = message, defaultDir = defaultPath, + defaultFile = defaultFile, wildcard = wildcard, style = style) + print dlg.ShowModal +@@ -76,7 +75,7 @@ def fileDialog(defaultPath='',defaultFil + def dirDialog(defaultPath='',message="www.stani.be",newDir=1): + """Launchs a directory selector dialog (wxpython).""" + style=wx.DEFAULT_DIALOG_STYLE +- if newDir:style|=wx.DD_NEW_DIR_BUTTON ++ if newDir:style|=0 + dlg = wx.DirDialog(None,message=message,defaultPath=defaultPath,style=style) + if dlg.Show() == wx.ID_OK:path=dlg.GetPath() + else:path='' +@@ -327,7 +326,6 @@ class FrameApp(wx.App): + wx.App.__init__(self, redirect=0) + + def OnInit(self): +- wx.InitAllImageHandlers() + frame = self.Frame(parent=None, id=-1, **self.keyw) + frame.Show(True) + self.SetTopWindow(frame) +@@ -376,7 +374,6 @@ class PanelApp(wx.App): + wx.App.__init__(self, redirect=redirect) + + def OnInit(self): +- wx.InitAllImageHandlers() + self.frame = frame = wx.Frame(None, -1, self.title, pos=(50,50), + size=(300,300), style=wx.NO_FULL_REPAINT_ON_RESIZE|wx.DEFAULT_FRAME_STYLE) + if self.icon: +Index: spe-0.8.4.h/_spe/sm/wxp/smdi.py +=================================================================== +--- spe-0.8.4.h.orig/_spe/sm/wxp/smdi.py ++++ spe-0.8.4.h/_spe/sm/wxp/smdi.py +@@ -1353,7 +1353,6 @@ class App(singleApp.SingleInstanceApp): + if self.active: + return False + self.Bind(singleApp.EVT_POST_ARGS, self.OnArgs) +- wx.InitAllImageHandlers() + self.parentFrame = self.ParentFrame(self, + size = self.size, + page = self.title, +Index: spe-0.8.4.h/_spe/test/test_realtime_ListCtrl.py +=================================================================== +--- spe-0.8.4.h.orig/_spe/test/test_realtime_ListCtrl.py ++++ spe-0.8.4.h/_spe/test/test_realtime_ListCtrl.py +@@ -77,7 +77,6 @@ class Frame(wx.Frame): + + class App(wx.App): + def OnInit(self): +- wx.InitAllImageHandlers() + frame = Frame(None, -1, "") + self.SetTopWindow(frame) + frame.Show() +Index: spe-0.8.4.h/_spe/test/test_realtime_TreeCtrl.py +=================================================================== +--- spe-0.8.4.h.orig/_spe/test/test_realtime_TreeCtrl.py ++++ spe-0.8.4.h/_spe/test/test_realtime_TreeCtrl.py +@@ -114,7 +114,6 @@ class Frame(wx.Frame): + + class App(wx.App): + def OnInit(self): +- wx.InitAllImageHandlers() + frame = Frame(None, -1, "") + self.SetTopWindow(frame) + frame.Show() diff -Nru spe-0.8.4.h/debian/source/format spe-0.8.4.h/debian/source/format --- spe-0.8.4.h/debian/source/format 2014-08-31 22:15:44.000000000 -0300 +++ spe-0.8.4.h/debian/source/format 2014-08-31 20:55:33.000000000 -0300 @@ -1 +1 @@ -1.0 +3.0 (quilt)