PySide6 DeprecationWarning of exec_
See original GitHub issueHi,
exec_ function is deprecated in PySide6, so the common PyQt5/PySide2 code gets deprecated warning when QT_API=pyside6.
DeprecationWarning: 'exec_' will be removed in the future. Use 'exec' instead.
sys.exit(app.exec_())
On the other hand, PyQt6 removes exec_ but QtPy provides exec_ for the compatibility. (#259) As a result, DeprecationWarning of exec_ occurs only when QT_API=pyside6. Which should this DeprecationWarning be addressed by QtPy or the user application? Note that print_ function of PySide6 may have the same problem.
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
DeprecationWarning not mentioned in the documentation
I tried to migrate a few hundred lines of code to PySide6, errors coming up, and these reports have not been mentioned in...
Read more >DeprecationWarning: Function when moving app (removed ...
DeprecationWarning : Function when moving app (removed titlebar) - PySide6 · The warning is telling you that the function may be removed in...
Read more >PyQt6 vs PySide6: What's the difference between the two ...
Python 3 removed the exec keyword, freeing the name up to be used. As a result from PyQt6 .exec() calls are named just...
Read more >Deprecation Warning for Enum Access · Issue #352 - GitHub
I noticed here that enums were promoted for PyQt6 , but not PySide6 . Is there a reason for that? I'm wondering because...
Read more >Enable the exec() functions (I7375e106) · Gerrit Code Review
Enable the exec() functions With Qt6, PySide dropped support for Python 2.7, ... The current change prints: Deprecation Warning: 'exec_' will be removed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I sent PR: #287 to fix this issue.
I mistook about the
print_
function of PySide6. Unlike exec_, PySide6/PySide2 does not haveprint
function. They haveprint_
function only.The summary is as follows.
I think QtPy don’t have to do anything about
print
andprint_
of PySide6 becauseprint_
is available on PyQt5/PyQt6/PySide2/PySide6. (when QT_API=pyqt6, QtPy already has mappedprint
toprint_
)