Closed SakulFlee closed 1 month ago
Thanks @SakulFlee for the report! I don't actually know anything about ArchLinux or AUR. Would you be able to show me how to reproduce this issue in a Docker container? Or perhaps instead raise this issue on AUR?
Just based on the stack trace, I'm guessing that pytestqt might be using a different version of Qt than Labelle. When I debug locally, I get that qt_api.QtWidgets.QWidget
is <class 'PyQt6.QtWidgets.QWidget'>
. Correspondingly, type(widget).mro()
is
[<class 'labelle.gui.gui.LabelleWindow'>, <class 'PyQt6.QtWidgets.QWidget'>, <class 'PyQt6.QtCore.QObject'>, <class 'PyQt6.sip.wrapper'>, <class 'PyQt6.QtGui.QPaintDevice'>, <class 'PyQt6.sip.simplewrapper'>, <class 'object'>]
so it's a match.
CC @claui
Oh my bad, I was assuming you are maintaining the AUR. I just tried replicating it under Docker, but it worked there. The only difference I can find is what the test session reports:
# Local:
platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0
PySide6 6.7.3 -- Qt runtime 6.7.3 -- Qt compiled 6.7.3
rootdir: /home/sakulflee/.cache/yay/labelle/src/labelle-1.3.1
configfile: pyproject.toml
plugins: qt-4.4.0, image-diff-0.0.11
# Docker:
platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0
PyQt6 6.7.1 -- Qt runtime 6.7.3 -- Qt compiled 6.7.3
rootdir: /home/build/.cache/yay/labelle/src/labelle-1.3.1
configfile: pyproject.toml
plugins: qt-4.4.0, image-diff-0.0.11
It seems to be PySide6 6.7.3
vs PyQt6 6.7.1
what's causing the issue.
I don't know enough about QT to know what this does or how to change it, Thanks for your help anyways :)
Actually, looking closer into this just now: There seems to be some incompatibility with your test and PySide2
.
It works fine on PyQT6
though...
If you want to reproduce the issue:
Start a docker container with arch (docker run -it --rm archlinux:latest
), then:
# Sync packages
pacman -Sy
# Install some requirements
pacman -S base-devel git sudo
# Create sudo group and enable it
groupadd sudo
echo "build ALL=(ALL:ALL) ALL" >> /etc/sudoers
# Add user (AUR packages cannot be installed as root)
useradd --create-home build
usermod -aG sudo build
passwd build # pick a password
# Install an AUR tool, like yay (https://github.com/Jguer/yay)
su build
cd
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
# enter password when asked
# Attempt installing Labelle
yay -S --noconfirm pyside6 # <- Introduces the bug! If removed it installs pyqt6 instead which works fine during testing
yay -S --noconfirm labelle # Simply press enter when questions appear or enter password, when asked observe error.
@SakulFlee, I just released v1.3.2 which I think should fix the issue, once it propagates to AUR.
@maresb Published v1.3.2 on the AUR, thanks!
@SakulFlee Feel free to comment on the AUR page directly if you bump into any issues with the PKGBUILD.
Works fine now via AUR! Thank you :)
Installation log
Linux version
QT Version