enthought / pyface

pyface: traits-capable windowing framework
Other
104 stars 55 forks source link

Use `exec` instead of `exec_` where possible for Qt #1208

Closed corranwebster closed 1 year ago

corranwebster commented 1 year ago

This uses hasattr to test whether exec is available, which should be all Qt backends except PySide2.

Fixes #1179 and is more complete than #1198

rahulporuri commented 1 year ago

This PR is good but we're seeing one more deprecating warning for exec_() when we run our testsuite that is coming from traitsui -

C:\Users\rporuri\.edm\envs\<env-name>\lib\site-packages\traitsui\qt4\ui_base.py:320: DeprecationWarning: 'exec_' will be removed in the future. Use 'exec' instead.
  ui.control.exec_()

but that's a separate concern.

rahulporuri commented 1 year ago

i've created the traitsui issue https://github.com/enthought/traitsui/issues/1987 mirroring this issue in pyface.