wx.lib.plot is unusable - uses incompatible constructors API e.g. wx.Cursor instead of wx.CursorFromImage

Bug #1545698 reported by Alek Kowalczyk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wxpython3.0 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

In Ubuntu 15.10 (wily) the wx.lib.plot module uses wrong constructors - some internal API incompatibility?

For instance wx.lib.plot.PlotCanvas.__init__ raises exception:

 File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/lib/plot.py", line 598, in __init__
    self.HandCursor = wx.Cursor(Hand.GetImage())
  File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_gdi.py", line 1510, in __init__
    _gdi_.Cursor_swiginit(self,_gdi_.new_Cursor(*args, **kwargs))
TypeError: Required argument 'type' (pos 2) not found

It seems wx.Cursor should be now wx.CursorFromImage.

Here is more comprehensive list of incompatibilities between wx.lib.plot and rest of wx
wx.Cursor => wx.CursorFromImage
wx.Bitmap => wx.EmptyBitmap
wx.Colour => wx.NamedColour

To make wx.lib.plot usable in Ubuntu 15.10, these two patches (or more) from github are required:
https://github.com/wxWidgets/wxPython/commit/25bcbf15615b64e095da75e934ea4d254998ec24#diff-20049c762e6b232d6d9ad97291271244
https://github.com/wxWidgets/wxPython/commit/30bc07d80ae1c81d70b4de2daac62ecd7996d703#diff-20049c762e6b232d6d9ad97291271244

If someone knows a workaround, would appreciate a hint.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wxpython3.0 - 3.0.2.0+dfsg-3

---------------
wxpython3.0 (3.0.2.0+dfsg-3) unstable; urgency=medium

  * Add myself to Uploaders.
  * Add patch to fix wx.lib.plot (LP: #1545698)

 -- Scott Talbert <email address hidden> Mon, 18 Jul 2016 20:21:42 -0400

Changed in wxpython3.0 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.