enthought / pyface

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

Use "exec" in preference to "exec_" when starting Qt event loops #1197

Closed mdickinson closed 1 year ago

mdickinson commented 1 year ago

Our most commonly-used Qt bindings, PySide6, issue a DeprecationWarning whenever exec_ is used. For example:

pyface/ui/qt4/confirmation_dialog.py:130: DeprecationWarning: 'exec_' will be removed in the future. Use 'exec' instead.

In the interests of avoiding test noise in downstream packages, it would be nice to avoid these warnings, perhaps by trying exec first (or by doing a hasattr check). Eventually, we should be able to drop the uses of exec_.

mdickinson commented 1 year ago

Ah, sorry; this is a duplicate (of #1179). Closing here.