Skip to content
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

Fix for PyQt6 #5775

merged 4 commits into from Oct 18, 2021

Fix for PyQt6 #5775

merged 4 commits into from Oct 18, 2021


Copy link

@hugovk hugovk commented Oct 16, 2021

Fixes #5774.

There are two problems in #5774:

This PR fixes the second,

We've only been testing PyQt5 on the CI. I can also reproduce this locally using PyQt6 on macOS, and on CI with MinGW (, so platform is irrelevant.

We added PyQt6 support in #5258, but as far as I can tell that should never have worked:

I compared the sdist of PyQt 6.0.0 with 6.0.3 (latest 6.0.x), and 6.1.1 (latest 6.1.x) and 6.2.0 (latest 6.2.x) and didn't see anything much changing in qiodevice* files.

So I don't know if we really need QIODevice.OpenMode from #5258. If no-one else is sure, guess it's okay to keep it in the try/except.

This also tests PyQt6 on the CI, on MinGW, to hopefully fix the first part, and means we're now testing both PyQt5 and 6 on CI.

@hugovk hugovk added the Qt Qt for Python, PyQt, PySide label Oct 16, 2021
@hugovk hugovk mentioned this pull request Oct 16, 2021
Copy link

@radarhere radarhere left a comment

Choose a reason for hiding this comment

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

It's not clear why I chose OpenMode in #5258. Perhaps I just misunderstood ?

Happy for it to be left in or removed.

Copy link
Member Author

hugovk commented Oct 18, 2021

Something has actually changed since PyQt6 6.0.0 and 6.2.0, and the old code is still needed.

On Mac, this fails on main and passes on this PR:

pip uninstall -y pyqt6; pip install pyqt6==6.2.0; pytest Tests/

And this passes for both main and this PR:

pip uninstall -y pyqt6; pip install pyqt6==6.0.0; pytest Tests/

@hugovk hugovk merged commit b4bd894 into python-pillow:main Oct 18, 2021
@hugovk hugovk deleted the mingw-qt6 branch October 18, 2021 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Qt Qt for Python, PyQt, PySide
None yet

Successfully merging this pull request may close these issues.

Qt test failures
2 participants