Please test the ekr-2882-qt-only2 branch

42 views
Skip to first unread message

Edward K. Ream

unread,
Mar 25, 2024, 7:37:36 AMMar 25
to leo-editor

The "ekr-2882-qt-only2" branch is ready for testing. See PR #3828.


This PR is a milestone: it removes all vestiges of Qt5 from Leo's codebase. As a result, much stronger mypy annotations are possible, but improved annotations will be the subject of a follow-on PR.


Thomas has raised three minor issues about this PR. I'll resolve these issues before merging the PR. I thank Thomas for his careful review.


I'll merge this PR later today or tomorrow. We'll continue our testing after the merge.


Edward

Thomas Passin

unread,
Mar 25, 2024, 8:47:43 AMMar 25
to leo-editor
Fails on Ubuntu:

cannot import name 'Qsci' from 'PyQt6' (/home/tom/.local/lib/python3.10/site-packages/PyQt6/__init__.py)

*** Leo could not be started ***

Please verify you've installed the required dependencies:



Edward K. Ream

unread,
Mar 25, 2024, 9:05:18 AMMar 25
to leo-e...@googlegroups.com
On Mon, Mar 25, 2024 at 7:47 AM Thomas Passin <tbp1...@gmail.com> wrote:
Fails on Ubuntu:

cannot import name 'Qsci' from 'PyQt6' (/home/tom/.local/lib/python3.10/site-packages/PyQt6/__init__.py)

Good catch. My apologies for the confusion.

This is a documentation error or a "transition" problem, depending on your point of view.

It's easy to fix: pip install PyQt6-QScintilla

I say this is a transition problem because requirements.txt now includes PyQt6-QScintilla.

There's no automatic way to avoid the extra dependency. Otoh, Leo 6.7.9 will provide the dependency automatically.

Summary

Everyone who uses GitHub should run pip install PyQt6-QScintilla

Edward

Thomas Passin

unread,
Mar 25, 2024, 9:21:00 AMMar 25
to leo-editor
That took care of the problem and the branch of Leo now runs on Ubuntu.  Also, VR3 opens.

Thomas Passin

unread,
Mar 25, 2024, 9:25:25 AMMar 25
to leo-editor
What is Leo using QScintilla for?

Thomas Passin

unread,
Mar 25, 2024, 9:45:47 AMMar 25
to leo-editor
Nav tab is missing on Debian, Python Console tab is missing on Linux Mint.  No apparent error messages.

Edward K. Ream

unread,
Mar 25, 2024, 9:48:52 AMMar 25
to leo-e...@googlegroups.com
On Mon, Mar 25, 2024 at 8:25 AM Thomas Passin <tbp1...@gmail.com> wrote:

What is Leo using QScintilla for?

For alternative syntax coloring, iirc.

BTW, the best way to install requirements is:

cd <path to>leo-editor
pip install -r requirements.txt

I've been talking to Rebecca about the transition process. The more I think about it, the more subtle it becomes :-)

The obvious thing to do would be to make QScintilla optional again. But I really don't want to do that now because it could interfere with mypy annotations.  Otoh, leoQt.py probably should print an error message before dying :-)

In short: I'll try various options before merging the Qt6-only PR.

Edward

Edward K. Ream

unread,
Mar 25, 2024, 9:49:55 AMMar 25
to leo-e...@googlegroups.com
On Mon, Mar 25, 2024 at 8:45 AM Thomas Passin <tbp1...@gmail.com> wrote:

Nav tab is missing on Debian, Python Console tab is missing on Linux Mint.  No apparent error messages.

Thanks for your testing!  Now I'll definitely delay the merge.

Edward

Thomas Passin

unread,
Mar 25, 2024, 9:52:35 AMMar 25
to leo-editor
Both Nav and Python Console are present on Linux Manjaro. Also, on Debian and Mint, if VR3 tries and fails to display an image, it stops working until Leo is restarted.  This hasn't happened as yet on Manjaro.

Lint is derived from Debian.  I wonder if they have something in common that's related?

Edward K. Ream

unread,
Mar 25, 2024, 12:51:20 PMMar 25
to leo-editor
On Monday, March 25, 2024 at 6:37:36 AM UTC-5 Edward K. Ream wrote:

The "ekr-2882-qt-only2" branch is ready for testing. See PR #3828.


This PR is a milestone: it removes all vestiges of Qt5 from Leo's codebase. As a result, much stronger mypy annotations are possible, but improved annotations will be the subject of a follow-on PR.


A recent rev makes the QSci module optional for the time being. This rev also improves the message that appears if Leo fails to load.

I'll fix the nits Thomas has reported and merge the PR later today or tomorrow.

Edward

Thomas Passin

unread,
Mar 27, 2024, 3:57:11 PMMar 27
to leo-editor
Some more Linux results:
ubuntu
        nav, console ok.  vr3 image problem
XUbuntu
        nav, console ok.  vr3 image problem

OpenSUSE
        needs libQt6WebEngineCore6, libQt6Quick6
        After installing them, Leo still couldn't start.  Those libQt6xx
        libraries were installed by zypper to /usr/lib64 but pyqt6
        wants version `Qt_6_PRIVATE_API'

Fedora
seems ok, vr3 images seem ok

Thomas Passin

unread,
Mar 27, 2024, 7:49:52 PMMar 27
to leo-editor
Oops, the last two were tested with devel, not the qt-only-2 branch..  I'll have to go back and repeat the test.

Thomas Passin

unread,
Mar 28, 2024, 12:01:39 AMMar 28
to leo-editor
I got the same results using the qt-only2 branch.
Reply all
Reply to author
Forward
0 new messages