enthought / enthought/traitsui

Use "exec()" instead of "exec_()" with PySide6

Open
#1,987 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
306
Forks
99
PR merge metrics
No merged PRs in 30d

Description

Like https://github.com/enthought/pyface/issues/1179, we should aim to use `exec()` with PySide6 instead of `exec_()` because the latter is deprecated.

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

We see the above deprecation warning when we run our testsuite. The deprecation warning is coming from https://github.com/enthought/traitsui/blob/ce8b285a6bedefc551b61bf3d39a74f7dd04d662/traitsui/qt4/ui_base.py#L320

There are a number of similar uses of `exec_()` in the codebase. For the record, https://github.com/enthought/pyface/pull/1208 is a more or less accepted solution at the moment to handle the use of `exec()` vs `exec_()`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.