Bug#761413: python-vtk6: Please update to use wxpython3.0
Olly Betts
olly at survex.com
Sat Sep 13 17:26:29 UTC 2014
Package: python-vtk6
Version: 6.1.0+dfsg-8+b2
Severity: important
Tags: sid jessie
User: freewx-maint at lists.alioth.debian.org
Usertags: wxpy3.0
Control: block 755757 by -1
I missed this package in my previous checks, as while it uses the wx API,
it doesn't seem to have any sort of dependency on python-wxgtk2.8 or
indeed any wx package AFAICS (it'd be useful for transitions, and I think
also for users, to at least have a "Suggests").
This simple script (provided by Thiago Franco Moraes) fails, due wx dropping
the older deprecated wxGLCanvas API which vtk is using:
from vtk.wx.wxVTKRenderWindowInteractor import wxVTKRenderWindowInteractorConeExample
wxVTKRenderWindowInteractorConeExample()
The output is:
/usr/lib/python2.7/dist-packages/vtk/wx/wxVTKRenderWindowInteractor.py:669: wxPyDeprecationWarning: Using deprecated class PySimpleApp.
app = wx.PySimpleApp()
Traceback (most recent call last):
File "/home/olly/vtkwx3.py", line 2, in <module>
wxVTKRenderWindowInteractorConeExample()
File "/usr/lib/python2.7/dist-packages/vtk/wx/wxVTKRenderWindowInteractor.py", line 673, in wxVTKRenderWindowInteractorConeExample
widget = wxVTKRenderWindowInteractor(frame, -1)
File "/usr/lib/python2.7/dist-packages/vtk/wx/wxVTKRenderWindowInteractor.py", line 175, in __init__
attribList=attribList)
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/glcanvas.py", line 106, in __init__
_glcanvas.GLCanvas_swiginit(self,_glcanvas.new_GLCanvas(*args, **kwargs))
TypeError: Argument given by name ('attribList') and position (3)
I've included the standard information from the other mails I filed
earlier below - the script doesn't handle the wxGLCanvas API changes,
but it may still be useful.
We're aiming to migrate the archive to using wxpython3.0 instead of
wxwidgets2.8, and hope to drop wxwidgets2.8 before jessie is released.
This transition is already underway, and is being tracked by the release
team here:
https://release.debian.org/transitions/html/wxpython3.0.html
The wxPython 3.0 API mostly adds to the wxPython2.8 API. Many packages
work with wxPython 3.0 without any changes, but there are a few
incompatibilities. For example, wx.Color is no longer supported as
an alias for wx.Colour, and some constants which were deprecated in 2.8
have been removed. All the removed constants I'm aware of were set to 0
in wxPython 2.8, so removing them is still compatible with 2.8.
To assist updating to wxPython 3.0, I've put together a script which
will help make the mechanical changes required. This is in a git repo
on collab-maint along with a README about using it and updating packages
for wxPython 3.0 in general:
http://anonscm.debian.org/cgit/collab-maint/wx-migration-tools.git
The script has some options to control the sorts of changes it makes -
see the README and --help output for more information - you can view
the latest version of the README online here:
http://anonscm.debian.org/cgit/collab-maint/wx-migration-tools.git/tree/README
I've developed this script by trying to convert 20+ packages. Please
try it out on your package - in many cases, it should be enough to get
your package working (if it doesn't already) - if it does, please upload
(and close this bug).
If the script doesn't do the job, please let me know (or improve the
script if you can figure out what it needs to do to get your package
working).
Another issue you may hit is that wxWidgets 3.0 now defaults to enabling
its "WXDEBUG" checks for incorrect API usage, so some applications will
emit scary sounding "assertion failures". These are unlikely to
actually be new, just in a default build of 2.8, such incorrect uses
were handled quietly behind the scenes. Sometimes these are easy to
fix, but if not you can easily patch the application to tell wx 3.0 to
handle them in the same way wx 2.8 does - details of how to do so are in
the README:
http://anonscm.debian.org/cgit/collab-maint/wx-migration-tools.git/tree/README
I'm happy to sponsor uploads for this transition, though if you have an
active sponsor already check with them first - I don't want to tread on
anyone's toes.
Cheers,
Olly
More information about the debian-science-maintainers
mailing list