PR: Monkey patch pyside2uic UIParser.readResources for Python 3.9 compatibility#325
PR: Monkey patch pyside2uic UIParser.readResources for Python 3.9 compatibility#325dalthviz merged 2 commits intospyder-ide:masterfrom
pyside2uic UIParser.readResources for Python 3.9 compatibility#325Conversation
I think you are right but I was not able to find where I should create the issue for PySide2 |
For info regarding that you can check here: https://wiki.qt.io/Qt_for_Python/Reporting_Bugs Edit: Maybe @cmaureir could guide us into if is worthy to open an issue or not |
pyside2uic UIParser.readResources for Python 3.9 compatibility
|
If I were to guess, it seems possible they would decline to fix it in PySide2, unfortunately, due to TQC dropping LTS support for open source (without a paid commercial subscription). In fact, at least as I understand it, PySide2 won't work at all with Python 3.10 for want of a one-line patch that they only applied to Qt6 (see #269). However, we could consider applying the patches ourselves on the Conda feedstock, assuming it is unblocked by progress on getting Qt >5.12 packaged. See discussion on #296 and e.g. conda-forge/pyside2-feedstock#91. |
That's right, as Qt/C++, we followed the new changes that 5.15.2 was the last OSS release.
We decided that supporting 3.10 was necessary, and we did a special release 5.15.2.1 that only included 3.10 support. You can check the wheel tags here https://pypi.org/project/PySide2/#files
As many linux distributions, it's common to include patches on top of the latest source: https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-5.15.2.1-src/ but hopefully the migration to Qt6 can be done soon, I know this is not in your plate but the responsibility of each software maintainer :( Complementary to the changes in The story of the dynamical loader, was motivated for our discussion with the people from pyqtgraph, that they required something to load .ui files, and not only convert them, so we did a |
Ah, gotcha, thanks—I'm glad for that. Looks like that happened after I last checked on the status of it.
Realistically, we're probably going to have to support Qt5 for many years yet, considering QtPy's purpose is a compatibility layer and Qt6 was released fairly recently and is still working to reach feature parity with Qt5, and Qt6 isn't out yet on CF or AD. Pragmatically, getting a new Qt minor/LTS version building and working on Conda-Forge (much less a major version) is a pretty large undertaking; builds there are still stuck on Qt 5.12.x (though I believe |
|
Thank you for the feedback @CAM-Gerlach and @cmaureir ! Also, just in case @andfoy is the one working on getting a new Qt minor/LTS version on conda-forge. Some links to the work he has been doing: conda-forge/qt-feedstock#206 https://github.com/conda-forge/qt-main-feedstock) |
|
Ah, sorry—somehow got it confused. Thanks for the links! |
|
I opened a PR on pyside2-feedstock with a patch for this: [conda-forge/pyside2-feedstock#105] |
Monkey patch UIParser.readResources to make it works with Python 3.9. Without this patch, we get this error:
https://docs.python.org/3.9/whatsnew/3.9.html#removed