Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#48734 - [python-pyqt5] Unable to import QtTest after updating to Qt-5.6

Attached to Project: Arch Linux
Opened by Clayton Craft (craftyguy) - Tuesday, 29 March 2016, 06:23 GMT
Last edited by Doug Newgard (Scimmia) - Friday, 06 January 2017, 21:21 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No


After updating qt5-* to 5.6, I am unable to import the QtTest library in python-pyqt5. The problem goes away when python-pyqt5 (which seems to still be at 5.5 in the official repo) is manually built against qt5.6 (using PKGBUILD from

$ python -c "from PyQt5 import QtTest"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: /usr/lib/python3.5/site-packages/PyQt5/ undefined symbol: _Z19qt_handleMouseEventP7QWindowRK7QPointFS3_6QFlagsIN2Qt11MouseButtonEES4_INS5_16KeyboardModifierEE

Additional info:
* package version(s)

Name : pyqt5-common
Version : 5.5.1-2
Name : python-pyqt5
Version : 5.5.1-2
Name : qt5-base
Version : 5.6.0-2

Full pacman -Qi is attached

Steps to reproduce:

1) update to qt5.6 in official repo using pacman

2) import QtTest:
$ python -c "from PyQt5 import QtTest"

This task depends upon

Closed by  Doug Newgard (Scimmia)
Friday, 06 January 2017, 21:21 GMT
Reason for closing:  Fixed
Comment by Florian Bruhin (The-Compiler) - Tuesday, 29 March 2016, 06:55 GMT
I was discussing with Scimmia in #archlinux whether pyqt5 should be added to qt5's rebuild.list - I'm not sure yet if it uses private API or not.

When I demangle the missing symbol, I get:

qt_handleMouseEvent(QWindow*, QPointF const&, QPointF const&, QFlags<Qt::MouseButton>, QFlags<Qt::KeyboardModifier>)

Looking at the Qt 5.6 header diff for qtest.h, I see:

-Q_GUI_EXPORT void qt_handleMouseEvent(QWindow *w, const QPointF & local, const QPointF & global, Qt::MouseButtons b, Qt::KeyboardModifiers mods = Qt::NoModifier);
+Q_GUI_EXPORT void qt_handleMouseEvent(QWindow *w, const QPointF &local, const QPointF &global, Qt::MouseButtons b, Qt::KeyboardModifiers mods, int timestamp);


It looks to me like this either was an unintentional ABI break from Qt, or qt_handleMouseEvent doesn't qualify as public API even though it's in a public header with a Q_GUI_EXPORT.

Maybe it should be added to rebuild.list either way, as it surely uses *a lot* of Qt, and there's a chance it'll break?
Comment by Florian Bruhin (The-Compiler) - Tuesday, 29 March 2016, 07:14 GMT
It seems like it was partly an accident (nobody bothered to fix), and partly BIC isn't necessarily guaranteed for QtTest:">

So I guess since PyQt uses QtTest, it should indeed land on the rebuild.list.
Comment by Florian Bruhin (The-Compiler) - Tuesday, 29 March 2016, 15:38 GMT
FWIW I also opened now - I'd still appreciate a pyqt5 rebuild though ;)