-
Notifications
You must be signed in to change notification settings - Fork 120
SG-41647 Deprecation warnigns for QTextCodec.setCodecForCStrings() #1083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
SG-41647 Deprecation warnigns for QTextCodec.setCodecForCStrings() #1083
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1083 +/- ##
=======================================
Coverage 79.61% 79.62%
=======================================
Files 198 198
Lines 20623 20624 +1
=======================================
+ Hits 16420 16421 +1
Misses 4203 4203
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
carlos-villavicencio-adsk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
python/tank/util/pyside6_patcher.py
Outdated
| "QTextCodec.setCodecForCStrings() is obsolete and was removed in Qt6/PySide6 " | ||
| "and will be removed after September 2026. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "QTextCodec.setCodecForCStrings() is obsolete and was removed in Qt6/PySide6 " | |
| "and will be removed after September 2026. " | |
| "QTextCodec.setCodecForCStrings() is obsolete and no longer exist since Qt5/PySide2. " | |
| "This method will be removed from Toolkit after December 2026. " |
python/tank/util/pyside2_patcher.py
Outdated
| "QTextCodec.setCodecForCStrings() is obsolete and no longer exists in Qt5/PySide2 " | ||
| "and will be removed after September 2026. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "QTextCodec.setCodecForCStrings() is obsolete and no longer exists in Qt5/PySide2 " | |
| "and will be removed after September 2026. " | |
| "QTextCodec.setCodecForCStrings() is obsolete and no longer exist since Qt5/PySide2. " | |
| "This method will be removed from Toolkit after December 2026. " |
This pull request updates the PySide patcher utilities to issue deprecation warnings when the obsolete
QTextCodec.setCodecForCStrings()method is called, instead of silently ignoring the call. This helps developers identify and remove usage of this method before it is removed in the future.Deprecation warning improvements:
warnings.warncall in thesetCodecForCStringsstatic method inQTextCodecwithinpython/tank/util/pyside2_patcher.py, informing users that the method is obsolete, will be removed after September 2026, and should be removed from their code.warnings.warncall in thesetCodecForCStringsstatic method inQTextCodecwithinpython/tank/util/pyside6_patcher.py, with messaging tailored for Qt6/PySide6.General code update:
warningsmodule in bothpython/tank/util/pyside2_patcher.pyandpython/tank/util/pyside6_patcher.pyto support the new deprecation warnings. [1] [2]