enable icon indicating copy to clipboard operation
enable copied to clipboard

Deprecation warning when using kiva explorer with wx backend (among other ETS errors)

Open rahulporuri opened this issue 4 years ago • 1 comments

When I use the kiva explorer with the wx backend, I see the following deprecation warning printed to the console -

C:\Users\rporuri\.edm\envs\enable-test-3.6-wx\lib\site-packages\kiva\agg\plat_support.py:188: wxPyDeprecationWarning: Call to deprecated item. Use GetHandle instead.
  self.draw(window_dc.GetHDC(), x, y, width, height)

Ref https://wxpython.org/Phoenix/docs/html/wx.DC.html#wx.DC.GetHDC and https://wxpython.org/Phoenix/docs/html/wx.DC.html#wx.DC.GetHandle Xref https://github.com/enthought/pyface/issues/901 and https://github.com/enthought/traitsui/issues/1535

rahulporuri avatar Mar 12 '21 13:03 rahulporuri

Looks like this isn't as simple as replacing GetHDC with GetHandle because if I do that, I see the following error -

Traceback (most recent call last):
  File "C:\Users\rporuri\.edm\envs\enable-test-3.6-wx\lib\site-packages\enable\abstract_window.py", line 515, in _paint
    self._window_paint(event)
  File "C:\Users\rporuri\.edm\envs\enable-test-3.6-wx\lib\site-packages\enable\wx\image.py", line 61, in _window_paint
    pixel_map.draw_to_wxwindow(control, 0, 0)
  File "C:\Users\rporuri\.edm\envs\enable-test-3.6-wx\lib\site-packages\kiva\agg\plat_support.py", line 188, in draw_to_wxwindow
    self.draw(window_dc.GetHandle(), x, y, width, height)
  File "C:\Users\rporuri\.edm\envs\enable-test-3.6-wx\lib\site-packages\kiva\agg\plat_support.py", line 167, in draw
    return _plat_support.PixelMap_draw(self, h_dc, x, y, width, height)
OverflowError: int too big to convert

rahulporuri avatar Mar 12 '21 14:03 rahulporuri