enthought / enthought/traitsui
Deprecation warnings under Python 3.6 + wxPython 4.0.1 backend running the demo example
- Dominant language
- Python
- Stars
- 306
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
[Issue migrated from enthought/traits#497]
@mprogram commented on [Thu Jul 04 2019](https://github.com/enthought/traits/issues/497)
https://docs.enthought.com/mayavi/mayavi/mlab.html
```
$ env QT_API=pyside2 ETS_TOOLKIT=wx idle-python3.6
14:29:56: Debug: Adding duplicate image handler for 'Windows bitmap file'
14:29:56: Debug: Adding duplicate image handler for 'Windows bitmap file'
14:29:58: Debug: Unsupported OpenGL attribute 32
```
in IDLE:
```
Python 3.6.8 (default, Jan 14 2019, 11:02:34)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license()" for more information.
>>>
======================= RESTART: ~/demo.py =======================
Warning (from warnings module):
File "/usr/lib/python3/dist-packages/pyface/ui/wx/clipboard.py", line 25
PythonObjectFormat = wx.CustomDataFormat('PythonObject')
wxPyDeprecationWarning: Call to deprecated item. Use wx.DataFormat instead.
Warning (from warnings module):
File "/usr/lib/python3/dist-packages/pyface/wx/drag_and_drop.py", line 99
PythonObject = wx.CustomDataFormat('PythonObject')
wxPyDeprecationWarning: Call to deprecated item. Use wx.DataFormat instead.
Warning (from warnings module):
File "/usr/lib/python3/dist-packages/pyface/ui/wx/action/action_item.py", line 378
self.control_id, label, bmp, wx.NullBitmap, kind, tooltip, longtip, None
wxPyDeprecationWarning: Call to deprecated item. Use :meth:`AddTool` instead.
Warning (from warnings module):
File "/usr/lib/python3/dist-packages/pyface/ui/wx/action/action_item.py", line 396
wx.EVT_TOOL(parent, self.control_id, self._on_tool)
wxPyDeprecationWarning: Call to deprecated item __call__. Use :meth:`EvtHandler.Bind` instead.
Warning (from warnings module):
File "/usr/lib/python3/dist-packages/pyface/ui/wx/window.py", line 198
self._position = event.GetEventObject().GetPositionTuple()
wxPyDeprecationWarning: Call to deprecated item. Use GetPosition instead
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pyface/ui/wx/window.py", line 198, in _wx_on_control_move
self._position = event.GetEventObject().GetPositionTuple()
File "/usr/lib/python3/dist-packages/traits/trait_handlers.py", line 236, in error
object, name, self.full_info(object, name, value), value
traits.trait_errors.TraitError: The '_position' trait of a MayaviViewer instance must be a tuple of the form: (a value of class 'int', a value of class 'int'), but a value of wx.Point(900, 730) was specified.
=============================== RESTART: Shell ===============================
>>>
```
also enthought/pyface/issues/416
---
@mprogram commented on [Thu Jul 04 2019](https://github.com/enthought/traits/issues/497#issuecomment-508454221)
Does the backend matter? I'm getting a **non-tiled** mesh under `ETS_TOOLKIT=qt`, whereas under `wx` it is both, meshed **and** tiled.
---
@corranwebster commented on [Thu Jul 04 2019](https://github.com/enthought/traits/issues/497#issuecomment-508472077)
We don't currently support WxPython 4 - there are branches of Pyface and TraitsUI which have support for WxPython 4, but I don't know about the state of Mayavi and WxPython, for example.
You want `env QT_API=pyside2 ETS_TOOLKIT=qt4` instead of `wx` most likely. Other caveats are that pyside2 support is experimental (PyQt4 and PyQt5 should work just fine) and I also would be cautious about trying to run from inside Idle which uses Tkinter, I think, unless it is starting up your app in a new process.
---
@mdickinson commented on [Thu Jul 04 2019](https://github.com/enthought/traits/issues/497#issuecomment-508473933)
I'm going to (attempt to) move this issue to the TraitsUI repository. It's not a Traits issue.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.