Conversation
Drop the optional popplerqt5/python3-poppler-qt5 dependency and the associated LIB_BAD guard. Use QPdfDocument from PyQt6.QtPdf instead, which ships as part of PyQt6 itself. Rendering now uses QPdfDocumentRenderOptions with Antialiasing and TextAntialiasing flags set, preserving the render quality of the original poppler-based code. Other PyQt6 migration changes: - app.exec_() replaced with app.exec() - pageCount()/pagePointSize()/render() replace numPages()/page()/renderToImage()
In that case you might want to mark this PR as 'Draft'' |
|
I am curious, did you write this, or did a LLM write this for you? I am running into several issues here.
error: patch failed: configs/sim/woodpecker/compensate.py:21 I removed the changes to compensate.py from the diff and the rest applies.
So I tried: from PyQt6.QtCore import QEnum as Q_ENUM That failed and further research tells me that QEnum was not included into pyqt6 until later (6.5+) versions. I am currently running Debian 12 - Bookworm on this VM. PyQt6.QtCore version tops out at 6.4.2. I am not sure if that stops your efforts, LinuxCNC is notoriously bad at drawing a line in the sand for supported Debian distros, but I think Boomworm is still very much supported. Obviously there are ways around all of this, but it's going to be quite an effort I think. What are you hoping to gain in the shift from pyqt5 to pyqt6? |
Here is the sand, with some lines in it: http://wiki.linuxcnc.org/cgi-bin/wiki.pl?MinimumSoftwareVersions |
Thanks Andy. Admittedly, I didn't know this existed. If I read it right, looks like Master min is Debian 12 - Bookworm. |
|
Yes, I have used a LLM, which is why the QVariant type is not dealt with in a proper manner. This approach will also make the diff tiny because the QtPy API is PyQt5-based, so basically only the imports change. |
Ok, I understand the situation a bit better now. @c-morley and I are the two developers actively working on GUIs that depend on pyqt5. Hopefully Chris will weigh in here, but I think it best to do as you suggested, that makes testing for that specific case pretty easy and allows you to move forward with dropping poppler from Forky. It also gives us some time to work on porting our GUIs over to pyqt6, since it seems like that's coming sooner rather than later. |
|
I thank you for looking at this issue - PyQy6 was on my agenda. |
|
Closing this in favour of #3881 |
This is a completely mechanical conversion from PyQt5 to PyQt6. This is not tested to run successfully yet.