[QScintilla] Problem with PyQt5.11 release and QScintilla
Phil Thompson
phil at riverbankcomputing.com
Sat Jun 23 21:11:36 BST 2018
On 23 Jun 2018, at 4:58 pm, Nicholas H.Tollervey <ntoll at ntoll.org> wrote:
>
> Hi Folks,
>
> First poster here...
>
> I've written a Python code editor for beginner programmers called Mu -- it's based upon feedback from teachers and learners. You can learn more about it here: https://codewith.mu/
>
> It's currently only 3.5k lines of Python and PyQt is a fundamental aspect of Mu. I override QScintilla for the editor widget and I've found it works really well for my use cases. Thanks to everyone on this list who has made such amazing work available for the likes of me to use.
>
> However, I've just done a "fresh" setup in a clean Python 3 virtualenv and I get errors.
>
> Pip reports I have QScintilla-2.10.5-5.11.1-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl installed but PyQt is the latest 5.11 release from today.
>
> When I run my code that has worked in all previous releases of PyQt I get this:
>
> QObject::connect: No such signal EditorPane::marginClicked(int,int,KeyboardModifiers)
> Traceback (most recent call last):
> File "./run.py", line 6, in <module>
> run()
> File "/home/ntoll/src/mu/mu/app.py", line 138, in run
> editor.restore_session(sys.argv[1:])
> File "/home/ntoll/src/mu/mu/logic.py", line 668, in restore_session
> self._view.add_tab(None, py, self.modes[self.mode].api(), NEWLINE)
> File "/home/ntoll/src/mu/mu/interface/main.py", line 263, in add_tab
> new_tab.connect_margin(self.breakpoint_toggle)
> File "/home/ntoll/src/mu/mu/interface/editor.py", line 170, in connect_margin
> self.marginClicked.connect(func)
> TypeError: connect() failed between (int,int,Qt::KeyboardModifiers) and unislot()
>
> It looks to me that marginClicked signal no longer exists (EditorPane is a child class of QsciScintilla). However, when I look at the resulting object it appears to be there. The handler I'm using looks like this:
>
> def debug_toggle_breakpoint(self, margin, line, modifiers):
> """
> How to handle the toggling of a breakpoint.
> """
> .... etc ....
>
> Which looks like the right signature given the signal.
>
> Any idea what's going on..? Am I missing something here..?
>
> I believe this may be a bug caused by Qt5.11, since the API docs don't suggest anything has changed, I can't find anything in the changes described in the release notes for this latest version and it's broken existing code that appears to work in a bog-standard way. (However, I hope it's a problem of *my* making and not a problem with the released libraries.)
There will be new releases tomorrow. Unfortunately its a regression in the SIP code generator that affects all the wheels.
Phil
More information about the QScintilla
mailing list