[Python-modules-commits] r30477 - in packages/python-pyface/trunk/debian (5 files)

varun at users.alioth.debian.org varun at users.alioth.debian.org
Wed Sep 3 04:15:29 UTC 2014


    Date: Wednesday, September 3, 2014 @ 04:15:27
  Author: varun
Revision: 30477

* Update for wxpython3.0 (Closes: #757313):
  + New patch: wxpy3.0-compat.patch
* Apply patch provided by Olly Betts, thanks!
* Acknowledge last NMU by Jonathan Wiltshire, thanks!

Added:
  packages/python-pyface/trunk/debian/patches/
  packages/python-pyface/trunk/debian/patches/series
  packages/python-pyface/trunk/debian/patches/wxpy3.0-compat.patch
Modified:
  packages/python-pyface/trunk/debian/changelog
  packages/python-pyface/trunk/debian/control

Modified: packages/python-pyface/trunk/debian/changelog
===================================================================
--- packages/python-pyface/trunk/debian/changelog	2014-09-03 04:07:59 UTC (rev 30476)
+++ packages/python-pyface/trunk/debian/changelog	2014-09-03 04:15:27 UTC (rev 30477)
@@ -1,3 +1,15 @@
+python-pyface (4.4.0-1) unstable; urgency=medium
+
+  [ Olly Betts ]
+  * Update for wxpython3.0 (Closes: #757313):
+    + New patch: wxpy3.0-compat.patch
+
+  [ Varun Hiremath ]
+  * Apply patch provided by Olly Betts, thanks!
+  * Acknowledge last NMU by Jonathan Wiltshire, thanks!
+
+ -- Varun Hiremath <varun at debian.org>  Wed, 03 Sep 2014 00:10:14 -0400
+
 python-pyface (4.4.0-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.

Modified: packages/python-pyface/trunk/debian/control
===================================================================
--- packages/python-pyface/trunk/debian/control	2014-09-03 04:07:59 UTC (rev 30476)
+++ packages/python-pyface/trunk/debian/control	2014-09-03 04:15:27 UTC (rev 30477)
@@ -13,7 +13,7 @@
 
 Package: python-pyface
 Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-wxgtk2.8, python-qt4
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-wxgtk3.0, python-qt4
 Breaks: python-traitsbackendqt, python-traitsbackendwx
 Replaces: python-traitsbackendqt, python-traitsbackendwx
 Description: traits-capable windowing framework

Added: packages/python-pyface/trunk/debian/patches/series
===================================================================
--- packages/python-pyface/trunk/debian/patches/series	                        (rev 0)
+++ packages/python-pyface/trunk/debian/patches/series	2014-09-03 04:15:27 UTC (rev 30477)
@@ -0,0 +1 @@
+wxpy3.0-compat.patch

Added: packages/python-pyface/trunk/debian/patches/wxpy3.0-compat.patch
===================================================================
--- packages/python-pyface/trunk/debian/patches/wxpy3.0-compat.patch	                        (rev 0)
+++ packages/python-pyface/trunk/debian/patches/wxpy3.0-compat.patch	2014-09-03 04:15:27 UTC (rev 30477)
@@ -0,0 +1,116 @@
+Description: Updates for wxPython 3.0
+ These changes should maintain compatibility with wxPython 2.8.
+Author: Olly Betts <olly at survex.com>
+Forwarded: no
+Last-Update: 2014-08-15
+
+Index: python-pyface-4.4.0/pyface/ui/wx/directory_dialog.py
+===================================================================
+--- python-pyface-4.4.0.orig/pyface/ui/wx/directory_dialog.py
++++ python-pyface-4.4.0/pyface/ui/wx/directory_dialog.py
+@@ -70,7 +70,7 @@ class DirectoryDialog(MDirectoryDialog,
+ 
+     def _create_control(self, parent):
+         # The default style.
+-        style = wx.OPEN
++        style = 0
+ 
+         # Create the wx style depending on which buttons are required etc.
+         if self.new_directory:
+Index: python-pyface-4.4.0/pyface/ui/wx/file_dialog.py
+===================================================================
+--- python-pyface-4.4.0.orig/pyface/ui/wx/file_dialog.py
++++ python-pyface-4.4.0/pyface/ui/wx/file_dialog.py
+@@ -105,11 +105,11 @@ class FileDialog(MFileDialog, Dialog):
+             default_filename = self.default_filename
+ 
+         if self.action == 'open':
+-            style = wx.OPEN
++            style = wx.FD_OPEN
+         elif self.action == 'open files':
+-            style = wx.OPEN | wx.MULTIPLE
++            style = wx.FD_OPEN | wx.FD_MULTIPLE
+         else:
+-            style = wx.SAVE | wx.OVERWRITE_PROMPT
++            style = wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT
+ 
+         # Create the actual dialog.
+         dialog = wx.FileDialog(parent, self.title, defaultDir=default_directory,
+Index: python-pyface-4.4.0/pyface/ui/wx/init.py
+===================================================================
+--- python-pyface-4.4.0.orig/pyface/ui/wx/init.py
++++ python-pyface-4.4.0/pyface/ui/wx/init.py
+@@ -15,17 +15,17 @@ import wx
+ 
+ 
+ # Check the version number is late enough.
+-if wx.VERSION < (2, 6):
+-    raise RuntimeError, "Need wx version 2.6 or higher, but got %s" % str(wx.VERSION)
++if wx.VERSION < (2, 8):
++    raise RuntimeError, "Need wx version 2.8 or higher, but got %s" % str(wx.VERSION)
+ 
+ # It's possible that it has already been initialised.
+ _app = wx.GetApp()
+ 
+ if _app is None:
+-    _app = wx.PySimpleApp()
+-
+-    # Before we can load any images we have to initialize wxPython's image
+-    # handlers.
+-    wx.InitAllImageHandlers()
++    # wx.PySimpleApp() is deprecated in wx3.0, but this is all it really does:
++    class PySimpleApp(wx.App):
++        def OnInit(self):
++            return True
++    _app = PySimpleApp()
+ 
+ #### EOF ######################################################################
+Index: python-pyface-4.4.0/pyface/wx/dialog.py
+===================================================================
+--- python-pyface-4.4.0.orig/pyface/wx/dialog.py
++++ python-pyface-4.4.0/pyface/wx/dialog.py
+@@ -36,7 +36,7 @@ class OpenFileDialog(wx.FileDialog):
+     def __init__(self, parent=None, **kw):
+         """ Constructor. """
+ 
+-        style = wx.OPEN | wx.HIDE_READONLY
++        style = wx.FD_OPEN
+ 
+         # Base-class constructor.
+         wx.FileDialog.__init__(self, parent, "Open", style=style, **kw)
+@@ -49,7 +49,7 @@ class OpenDirDialog(wx.DirDialog):
+     def __init__(self, parent=None, **kw):
+         """ Constructor. """
+ 
+-        style = wx.OPEN | wx.HIDE_READONLY | wx.DD_NEW_DIR_BUTTON
++        style = wx.DD_NEW_DIR_BUTTON
+ 
+         # Base-class constructor.
+         wx.DirDialog.__init__(self, parent, "Open", style=style, **kw)
+@@ -62,7 +62,7 @@ class SaveFileAsDialog(wx.FileDialog):
+     def __init__(self, parent=None, **kw):
+         """ Constructor. """
+ 
+-        style = wx.SAVE | wx.OVERWRITE_PROMPT
++        style = wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT
+ 
+         # Base-class constructor.
+         wx.FileDialog.__init__(self, parent, "Save As", style=style, **kw)
+Index: python-pyface-4.4.0/pyface/util/guisupport.py
+===================================================================
+--- python-pyface-4.4.0.orig/pyface/util/guisupport.py
++++ python-pyface-4.4.0/pyface/util/guisupport.py
+@@ -81,7 +81,12 @@ def get_app_wx(*args, **kwargs):
+     if app is None:
+         if not kwargs.has_key('redirect'):
+             kwargs['redirect'] = False
+-        app = wx.PySimpleApp(*args, **kwargs)
++        # wx.PySimpleApp() is deprecated in wx3.0, but this is all it really
++        # does:
++        class PySimpleApp(wx.App):
++            def OnInit(self):
++                return True
++        app = PySimpleApp(*args, **kwargs)
+     return app
+ 
+ def is_event_loop_running_wx(app=None):




More information about the Python-modules-commits mailing list