enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.28k stars 282 forks source link

MAINT: Compat with traitsui 8 #1255

Closed larsoner closed 1 year ago

larsoner commented 1 year ago

Hopefully fixes stuff like this:

______________________________ test_kit2fiff_gui _______________________________
mne_kit_gui/tests/test_kit2fiff_gui.py:123: in test_kit2fiff_gui
    ui, frame = mne_kit_gui.kit2fiff()
mne_kit_gui/__init__.py:69: in kit2fiff
    from ._kit2fiff_gui import Kit2FiffFrame
mne_kit_gui/_kit2fiff_gui.py:27: in <module>
    from tvtk.pyface.scene_editor import SceneEditor
/usr/local/miniconda/envs/mne-kit-gui/lib/python3.11/site-packages/tvtk/pyface/scene_editor.py:12: in <module>
    SceneEditor = toolkit_object('scene_editor:SceneEditor')
/usr/local/miniconda/envs/mne-kit-gui/lib/python3.11/site-packages/pyface/base_toolkit.py:127: in __call__
    module = import_module(mname, package)
/usr/local/miniconda/envs/mne-kit-gui/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
/usr/local/miniconda/envs/mne-kit-gui/lib/python3.11/site-packages/tvtk/pyface/ui/qt4/scene_editor.py:16: in <module>
    from traitsui.qt4.editor import Editor
E   ModuleNotFoundError: No module named 'traitsui.qt4.editor'
larsoner commented 1 year ago

Also updated CIs to use pyvista/setup-headless-display-action which I maintain for use by several packages to ensure Qt5/6 work on GitHub actions for Linux without manually needing to fire up or use an Xvfb-specific action and update packages manually anymore

prabhuramachandran commented 1 year ago

@larsoner Thank youvery much for this! I have been swamped and will not be able to get to a proper fix until early June but in the meanwhile this looks good so I will review and merge away. I will need to do this: #1228 which I will do once I am back.

corranwebster commented 1 year ago

Putting this here for reference in case anyone else runs into issues before the next Mayavi release: there is also a "backwards compatibility" import hook for Pyface and TraitsUI which allows the *.qt4.* imports to work: