Another mass update: PR #3367

41 views
Skip to first unread message

Edward K. Ream

unread,
Jun 9, 2023, 2:04:31 PM6/9/23
to leo-editor
PR #3367 imports Callable from collections.abc instead of typing.  typing.Callable is deprecated, but is not presently scheduled for removal. Nevertheless I thought it best to do the replacement.

To my knowledge no further changes to Leo's mypy-related code are needed.

Please report any problems.

Edward

Thomas Passin

unread,
Jun 9, 2023, 3:09:04 PM6/9/23
to leo-editor
Leo loaded using Python 3.11 on Windows.  So that's good.

Viktor Ransmayr

unread,
Jun 10, 2023, 1:58:04 AM6/10/23
to leo-editor
Hello Edward,

 I've tested the 'leo-editor:devel' branch in a Fedora 37 VM.

Running Leo's unit tests reports two errors:

::

    (Leo) [user@fedora-leo-study-vm Leo]$
    (Leo) [user@fedora-leo-study-vm Leo]$ cd leo-editor/leo
    (Leo) [user@fedora-leo-study-vm leo]$ python -m unittest
    ................................................................................
    ................................................................................
    ................................................................................
    ................................................................................
    ..........................................Missing visitor: TokenOrderGenerator.TryStar
    F......F........................................................................
    ................................................................................
    ................................................................................
    .................................................................s..............
    ..........................................................
    (python:1814): Gdk-CRITICAL **: 07:30:49.345: gdk_atom_intern: assertion 'atom_name != NULL' failed

    (python:1814): Gdk-CRITICAL **: 07:30:49.345: gdk_atom_intern: assertion 'atom_name != NULL' failed
    .........s......................................................................
    ..................cursesGui2.py: Tk module required for clipboard handling.
    s.........
    ======================================================================
    FAIL: test_visitors_exist (unittests.core.test_leoAst.TestTokens.test_visitors_exist)
    Ensure that visitors for all ast nodes exist.
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/unittests/core/test_leoAst.py", line 2745, in test_visitors_exist
        assert not errors, msg
    AssertionError: 63 node types, 32 op types, 1 errors

    ======================================================================
    FAIL: test_bug_3270_at_path (unittests.core.test_leoAtFile.TestAtFile.test_bug_3270_at_path)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/unittests/core/test_leoAtFile.py", line 102, in test_bug_3270_at_path
        self.assertEqual(path, expected)
    AssertionError: '/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/c:/temp/leo/at_file_test.py' != 'c:/temp/leo/at_file_test.py'
    - /home/user/PyVE/GitHub/Leo/leo-editor/leo/core/c:/temp/leo/at_file_test.py
    + c:/temp/leo/at_file_test.py


    ----------------------------------------------------------------------
    Ran 848 tests in 5.994s

    FAILED (failures=2, skipped=3)
    (Leo) [user@fedora-leo-study-vm leo]$

Leo's unit tests should not make the assumption, that everyone is running them on Windows ;-)

With kind regards,

Viktor

Edward K. Ream

unread,
Jun 10, 2023, 3:27:41 AM6/10/23
to leo-e...@googlegroups.com
On Fri, Jun 9, 2023 at 2:09 PM Thomas Passin <tbp1...@gmail.com> wrote:
Leo loaded using Python 3.11 on Windows.  So that's good.

Thanks for testing.

Edward

Edward K. Ream

unread,
Jun 10, 2023, 3:40:20 AM6/10/23
to leo-e...@googlegroups.com
On Sat, Jun 10, 2023 at 12:58 AM Viktor Ransmayr <viktor....@gmail.com> wrote:

 I've tested the 'leo-editor:devel' branch in a Fedora 37 VM.

Running Leo's unit tests reports two errors:

Thanks for the report. The failing test_visitors_exist test is due to the new `trystar` ast node in Python 3.11. See Leo issue #3368.

The failing test_bug_3270_at_path test is likely due to a problem with the test itself. See Leo issue #3369.

Edward

Thomas Passin

unread,
Jun 10, 2023, 9:57:12 AM6/10/23
to leo-editor
That trystar error shows up on my Windows 3.11 machine too:

C:\Tom\git\leo-editor\leo\scripts>test-leo
test-leo
..........................................................................................................................................................................................................................................................................................................................................................................Missing visitor: TokenOrderGenerator.TryStar
F..................................................................................................................................................................................................................................................................................................................................................................................................s..................................................................................................
======================================================================
FAIL: test_visitors_exist (leo.unittests.core.test_leoAst.TestTokens.test_visitors_exist)

Ensure that visitors for all ast nodes exist.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Tom\git\leo-editor\leo\unittests\core\test_leoAst.py", line 2745, in test_visitors_exist

    assert not errors, msg
AssertionError: 63 node types, 32 op types, 1 errors

----------------------------------------------------------------------
Ran 848 tests in 9.476s

FAILED (failures=1, skipped=1)


Edward K. Ream

unread,
Jun 10, 2023, 10:44:17 AM6/10/23
to leo-e...@googlegroups.com
On Sat, Jun 10, 2023 at 8:57 AM Thomas Passin <tbp1...@gmail.com> wrote:
That trystar error shows up on my Windows 3.11 machine too:

It will show up on any Python 3.11 machine :-)

Edward
Reply all
Reply to author
Forward
0 new messages