Skip to content

PR: Map exec_ to their non-deprecated alternatives#287

Merged
dalthviz merged 1 commit intospyder-ide:masterfrom
kumattau:pyside6-exec_
Nov 26, 2021
Merged

PR: Map exec_ to their non-deprecated alternatives#287
dalthviz merged 1 commit intospyder-ide:masterfrom
kumattau:pyside6-exec_

Conversation

@kumattau
Copy link
Copy Markdown
Contributor

@kumattau kumattau commented Nov 26, 2021

This PR fixes #286.

All exec_s of PySide6 are simply mapped (assigned) to execs to avoid the following DeprecationWarning of PySide6.

DeprecationWarning: 'exec_' will be removed in the future. Use 'exec' instead.
  sys.exit(app.exec_())

I think if there is no problem if exec_ is overwritten, this PR can be merged.
If a way to access the original exec_ is required, QtPy needs to provide the option for controlling the overwrite or the special attribute for accessing original exec_.

Copy link
Copy Markdown
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kumattau for all the help with this one! LGTM 👍

@dalthviz dalthviz merged commit 016e8c5 into spyder-ide:master Nov 26, 2021
@kumattau kumattau deleted the pyside6-exec_ branch November 26, 2021 17:20
@CAM-Gerlach
Copy link
Copy Markdown
Member

Thanks @kumattau !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PySide6 DeprecationWarning of exec_

3 participants