PR #4840: the todo plugin works again

45 views
Skip to first unread message

Edward K. Ream

unread,
Aug 3, 2026, 9:07:55 AM (8 days ago) Aug 3
to leo-editor
PR #4840 fixes crashers caused by PR #48929.

PR #4840 also fixes all annotations in todo.py. It passes various by-hand tests.

PR #4841 (in progress) will cover the bulk of todo.py with unit tests so that by-hand tests should not be necessary.

Please keep testing "devel"!

Edward

Viktor Ransmayr

unread,
Aug 3, 2026, 3:32:32 PM (7 days ago) Aug 3
to leo-editor
Hello Edward,

Script ' full_test_leo' reports the following errors on Debian 13:

    ...
    OK (skipped=3)
    QBasicTimer::start: QBasicTimer can only be used with threads started with QThread
    <  Deleted multiple instances of the same msg ... >
    QBasicTimer::start: QBasicTimer can only be used with threads started with QThread
    Segmentation fault (core dumped)
    mypy_leo.py
    leo/plugins/todo.py:547: error: Incompatible default for argument "prog" (default has type "int | str", argument has type "int")  [assignment]
    Found 1 error in 1 file (checked 258 source files)
    ruff_leo.py
    ... 

Viktor

Edward K. Ream

unread,
Aug 4, 2026, 6:48:56 AM (7 days ago) Aug 4
to leo-editor
On Mon, Aug 3, 2026 at 2:32 PM Viktor Ransmayr wrote:

>​> PR #4841 (in progress) will cover the bulk of todo.py with unit tests so that by-hand tests should not be necessary.

> Script ' full_test_leo' reports the following errors on Debian 13:

    QBasicTimer::start: QBasicTimer can only be used with threads started with QThread

Am I correct in assuming you see these messages only when testing  PR #4841? I saw those messages yesterday on Windows while working on the PR.  

Ironically, removing these messages will likely be the PR's major contribution! That is, the PR demonstrates how easy it is to cover Qt code, and removing the messages will help generalize Leo's Qt testing framework.

I say "ironically" because I am going to demote the todo.py plugin. It is my strong opinion that it should not be enabled by default.

Thanks again for your relentless testing.

Edward

Viktor Ransmayr

unread,
Aug 4, 2026, 8:02:27 AM (7 days ago) Aug 4
to leo-e...@googlegroups.com
Hello Edward,

Am Di., 4. Aug. 2026 um 12:49 Uhr schrieb Edward K. Ream <edre...@gmail.com>:
On Mon, Aug 3, 2026 at 2:32 PM Viktor Ransmayr wrote:

>> PR #4841 (in progress) will cover the bulk of todo.py with unit tests so that by-hand tests should not be necessary.

> Script ' full_test_leo' reports the following errors on Debian 13:
    QBasicTimer::start: QBasicTimer can only be used with threads started with QThread

Am I correct in assuming you see these messages only when testing  PR #4841?

Yes, the messages & the segmentation fault only occur, when I run the 'full_test_leo' script.

Viktor

Edward K. Ream

unread,
Aug 4, 2026, 10:30:11 AM (6 days ago) Aug 4
to leo-e...@googlegroups.com
On Tue, Aug 4, 2026 at 7:02 AM Viktor Ransmayr wrote:

> Yes, the messages & the segmentation fault only occur when I run the 'full_test_leo' script.

Thanks for the clarification. 

Recent revs in PR #4841 elegantly fix the segfaults for me. What happens on your end?

Edward

Viktor Ransmayr

unread,
Aug 4, 2026, 12:30:04 PM (6 days ago) Aug 4
to leo-editor
Hello Edward,

I did the test on Fedora 44 this time. - The segmentation fault is gone. 

The reported msg has changed ! - Don't know if this is relevant ?

Here's the relevant part of the log:

    ...
    OK (skipped=3)
    QBasicTimer::start: current thread's event dispatcher has already been destroyed
    < Multiple instances of the same msg deleted ... >
    QBasicTimer::start: current thread's event dispatcher has already been destroyed
    mypy_leo.py
    leo/plugins/todo.py:548: error: Incompatible default for argument "prog" (default has type "int | str", argument has type "int")  [assignment]

    Found 1 error in 1 file (checked 258 source files)
    ruff_leo.py
    ...

Viktor

Edward K. Ream

unread,
Aug 4, 2026, 12:43:48 PM (6 days ago) Aug 4
to leo-editor
On Tuesday, August 4, 2026 at 11:30:04 AM UTC-5 Viktor wrote:

>> Recent revs in PR #4841 elegantly fix the segfaults for me. What happens on your end?

> I did the test on Fedora 44 this time. - The segmentation fault is gone.
> The reported msg has changed ! - Don't know if this is relevant ?

I'm a bit confused. There's a message without a segfault?

Anyway, PR #4841 is now part of "devel", so we can all "get to" test it.

Edward
Reply all
Reply to author
Forward
0 new messages