PyQt5 5.15.9 support for Python 3.11 on Windows - and a QML plugin issue

Kyle Altendorf sda at fstab.net
Sat Mar 25 15:29:33 GMT 2023


While I am not presently doing any work with Qt at all, I am trying to make it through updating the pyqt-tools family of projects to ease the hassle for those that find it useful.  [0]  I have made it through the layers up to pyqt-plugins which is building and passing tests for all of:

- Linux, macOS, and Windows
- Python 3.8 through 3.11
- PyQt5 5.15.9 and PyQt6 6.4.2

Except...  for Windows with Python 3.11 and PyQt5 5.15.9.  So my first question is: Is PyQt5 5.15.9 expected to fully work with Python 3.11 on Windows?

If yes, then I would be curious for thoughts on why the following error would happen only in this specific case.

https://github.com/altendky/pyqt-plugins/actions/runs/4516468364/jobs/7954838476#step:14:109

file:///D:/a/pyqt-plugins/pyqt-plugins/.tox/py311-qt5/Lib/site-packages/pyqt5_plugins/examples/qmldir:-1 plugin cannot be loaded for module "D:.a.pyqt-plugins.pyqt-plugins..py311-qt5.Lib.site-packages.pyqt5_plugins.examples": Module namespace 'examples' does not match import URI 'D:.a.pyqt-plugins.pyqt-plugins..py311-qt5.Lib.site-packages.pyqt5_plugins.examples'

I did note a small change in PyQt*QmlPlugin::registerTypes possibly related to this [1], though it doesn't explain why there's only an issue with Python 3.11 combined with Windows.

PyQt5: import_path << QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
https://doc.qt.io/qt-5/qlibraryinfo.html#location

PyQt6: import_path << QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath);
https://doc.qt.io/qt-6/qlibraryinfo.html#path

Thanks for any pointers anyone has around this.

Cheers,
-kyle


0: https://github.com/altendky/pyqt-tools/issues/110
1: https://github.com/altendky/pyqt-tools/issues/110#issuecomment-1483847164


More information about the PyQt mailing list