Source: python-pynvim
Version: 0.5.0-1
Severity: normal
User: debian-pyt...@lists.debian.org
Usertags: python3.13
Forwarded: https://github.com/neovim/pynvim/issues/571

This package failed build from source when test-built against a version of
python3-defaults that includes 3.13 as a supported version.

To reproduce this issue, build against python3-defaults (python3-all-dev etc.)
from Debian experimental.

What's new in Python 3.13:
https://docs.python.org/3.13/whatsnew/3.13.html

Log snippet:

   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pynvim/build; 
python3.13 -m pytest -vv
============================= test session starts ==============================
platform linux -- Python 3.13.0rc2, pytest-8.3.3, pluggy-1.5.0 -- 
/usr/bin/python3.13
cachedir: .pytest_cache
rootdir: /<<PKGBUILDDIR>>
configfile: setup.cfg
plugins: typeguard-4.3.0
collecting ... collected 74 items

test/test_buffer.py::test_repr PASSED                                    [  1%]
test/test_buffer.py::test_get_length PASSED                              [  2%]
test/test_buffer.py::test_get_set_del_line PASSED                        [  4%]
test/test_buffer.py::test_get_set_del_slice PASSED                       [  5%]
test/test_buffer.py::test_vars PASSED                                    [  6%]
test/test_buffer.py::test_api PASSED                                     [  8%]
test/test_buffer.py::test_options PASSED                                 [  9%]
test/test_buffer.py::test_number PASSED                                  [ 10%]
test/test_buffer.py::test_name PASSED                                    [ 12%]
test/test_buffer.py::test_valid PASSED                                   [ 13%]
test/test_buffer.py::test_append PASSED                                  [ 14%]
test/test_buffer.py::test_mark PASSED                                    [ 16%]
test/test_buffer.py::test_invalid_utf8 PASSED                            [ 17%]
test/test_buffer.py::test_get_exceptions PASSED                          [ 18%]
test/test_buffer.py::test_set_items_for_range PASSED                     [ 20%]
test/test_buffer.py::test_update_highlights PASSED                       [ 21%]
test/test_buffer.py::test_buffer_inequality PASSED                       [ 22%]
test/test_client_rpc.py::test_call_and_reply PASSED                      [ 24%]
test/test_client_rpc.py::test_call_api_before_reply PASSED               [ 25%]
test/test_client_rpc.py::test_async_call PASSED                          [ 27%]
test/test_client_rpc.py::test_recursion PASSED                           [ 28%]
test/test_concurrency.py::test_interrupt_from_another_thread PASSED      [ 29%]
test/test_concurrency.py::test_exception_in_threadsafe_call PASSED       [ 31%]
test/test_decorators.py::test_command_count PASSED                       [ 32%]
test/test_events.py::test_receiving_events PASSED                        [ 33%]
test/test_events.py::test_sending_notify PASSED                          [ 35%]
test/test_events.py::test_async_error PASSED                             [ 36%]
test/test_events.py::test_broadcast PASSED                               [ 37%]
test/test_host.py::test_host_imports PASSED                              [ 39%]
test/test_host.py::test_host_import_rplugin_modules PASSED               [ 40%]
test/test_host.py::test_host_clientinfo PASSED                           [ 41%]
test/test_host.py::test_host_async_error PASSED                          [ 43%]
test/test_host.py::test_legacy_vim_eval PASSED                           [ 44%]
test/test_logging.py::test_setup_logging PASSED                          [ 45%]
test/test_tabpage.py::test_windows PASSED                                [ 47%]
test/test_tabpage.py::test_vars PASSED                                   [ 48%]
test/test_tabpage.py::test_valid PASSED                                  [ 50%]
test/test_tabpage.py::test_number PASSED                                 [ 51%]
test/test_tabpage.py::test_repr PASSED                                   [ 52%]
test/test_version.py::test_version PASSED                                [ 54%]
test/test_vim.py::test_clientinfo PASSED                                 [ 55%]
test/test_vim.py::test_command PASSED                                    [ 56%]
test/test_vim.py::test_command_output PASSED                             [ 58%]
test/test_vim.py::test_command_error PASSED                              [ 59%]
test/test_vim.py::test_eval PASSED                                       [ 60%]
test/test_vim.py::test_call PASSED                                       [ 62%]
test/test_vim.py::test_api PASSED                                        [ 63%]
test/test_vim.py::test_strwidth PASSED                                   [ 64%]
test/test_vim.py::test_chdir PASSED                                      [ 66%]
test/test_vim.py::test_current_line PASSED                               [ 67%]
test/test_vim.py::test_current_line_delete PASSED                        [ 68%]
test/test_vim.py::test_vars PASSED                                       [ 70%]
test/test_vim.py::test_options PASSED                                    [ 71%]
test/test_vim.py::test_local_options PASSED                              [ 72%]
test/test_vim.py::test_buffers PASSED                                    [ 74%]
test/test_vim.py::test_windows PASSED                                    [ 75%]
test/test_vim.py::test_tabpages PASSED                                   [ 77%]
test/test_vim.py::test_hash PASSED                                       [ 78%]
test/test_vim.py::test_python3 PASSED                                    [ 79%]
test/test_vim.py::test_python3_ex_eval FAILED                            [ 81%]
test/test_vim.py::test_python_cwd PASSED                                 [ 82%]
test/test_vim.py::test_lua PASSED                                        [ 83%]
test/test_window.py::test_buffer PASSED                                  [ 85%]
test/test_window.py::test_cursor PASSED                                  [ 86%]
test/test_window.py::test_height PASSED                                  [ 87%]
test/test_window.py::test_width PASSED                                   [ 89%]
test/test_window.py::test_vars PASSED                                    [ 90%]
test/test_window.py::test_options PASSED                                 [ 91%]
test/test_window.py::test_position PASSED                                [ 93%]
test/test_window.py::test_tabpage PASSED                                 [ 94%]
test/test_window.py::test_valid PASSED                                   [ 95%]
test/test_window.py::test_number PASSED                                  [ 97%]
test/test_window.py::test_handle PASSED                                  [ 98%]
test/test_window.py::test_repr PASSED                                    [100%]

=================================== FAILURES ===================================
_____________________________ test_python3_ex_eval _____________________________

vim = <pynvim.api.nvim.Nvim object at 0xffff8efcdc50>

    def test_python3_ex_eval(vim: Nvim) -> None:
        assert '42' == vim.command_output('python3 =42')
        assert '42' == vim.command_output('python3 =   42     ')
        assert '42' == vim.command_output('py3=    42     ')
        assert '42' == vim.command_output('py=42')
    
        # On syntax error or evaluation error, stacktrace information is printed
        # Note: the pynvim API command_output() throws an exception on error
        # because the Ex command :python will throw (wrapped with 
provider#python3#Call)
        with pytest.raises(NvimError) as excinfo:
            vim.command('py3= 1/0')
>       assert textwrap.dedent('''\
            Traceback (most recent call last):
              File "<string>", line 1, in <module>
            ZeroDivisionError: division by zero
            ''').strip() in excinfo.value.args[0]
E       assert 'Traceback (most recent call last):\n  File "<string>", line 1, 
in <module>\nZeroDivisionError: division by zero' in 'function 
provider#python3#Call, line 18: Vim(return):Error invoking \'python_execute\' 
on channel 3 (python3-script-host):\nTraceback (most recent call last):\n  File 
"<string>", line 1, in <module>\n    import sys; sys.path = [p for p in 
sys.path if p != ""]; import neovim; neovim.start_host()\n    
^^^\nZeroDivisionError: division by zero'
E        +  where 'Traceback (most recent call last):\n  File "<string>", line 
1, in <module>\nZeroDivisionError: division by zero' = <built-in method strip 
of str object at 0xffff8f25e790>()
E        +    where <built-in method strip of str object at 0xffff8f25e790> = 
'Traceback (most recent call last):\n  File "<string>", line 1, in 
<module>\nZeroDivisionError: division by zero\n'.strip
E        +      where 'Traceback (most recent call last):\n  File "<string>", 
line 1, in <module>\nZeroDivisionError: division by zero\n' = <function dedent 
at 0xffff90b6a7a0>('        Traceback (most recent call last):\n          File 
"<string>", line 1, in <module>\n        ZeroDivisionError: division by zero\n  
      ')
E        +        where <function dedent at 0xffff90b6a7a0> = textwrap.dedent

test/test_vim.py:232: AssertionError
=============================== warnings summary ===============================
.pybuild/cpython3_3.13_pynvim/build/test/test_buffer.py: 17 warnings
.pybuild/cpython3_3.13_pynvim/build/test/test_client_rpc.py: 4 warnings
.pybuild/cpython3_3.13_pynvim/build/test/test_concurrency.py: 2 warnings
.pybuild/cpython3_3.13_pynvim/build/test/test_events.py: 4 warnings
.pybuild/cpython3_3.13_pynvim/build/test/test_host.py: 5 warnings
.pybuild/cpython3_3.13_pynvim/build/test/test_tabpage.py: 5 warnings
.pybuild/cpython3_3.13_pynvim/build/test/test_vim.py: 22 warnings
.pybuild/cpython3_3.13_pynvim/build/test/test_window.py: 12 warnings
  /usr/lib/python3.13/asyncio/events.py:842: DeprecationWarning: 
'get_child_watcher' is deprecated as of Python 3.12 and will be removed in 
Python 3.14.
    return get_event_loop_policy().get_child_watcher()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED test/test_vim.py::test_python3_ex_eval - assert 'Traceback (most recent 
call last):\n  File "<string>", line 1, in <module>\nZeroDivisionError: 
division by zero' in 'function provider#python3#Call, line 18: 
Vim(return):Error invoking \'python_execute\' on channel 3 
(python3-script-host):\nTraceback (most recent call last):\n  File "<string>", 
line 1, in <module>\n    import sys; sys.path = [p for p in sys.path if p != 
""]; import neovim; neovim.start_host()\n    ^^^\nZeroDivisionError: division 
by zero'
 +  where 'Traceback (most recent call last):\n  File "<string>", line 1, in 
<module>\nZeroDivisionError: division by zero' = <built-in method strip of str 
object at 0xffff8f25e790>()
 +    where <built-in method strip of str object at 0xffff8f25e790> = 
'Traceback (most recent call last):\n  File "<string>", line 1, in 
<module>\nZeroDivisionError: division by zero\n'.strip
 +      where 'Traceback (most recent call last):\n  File "<string>", line 1, 
in <module>\nZeroDivisionError: division by zero\n' = <function dedent at 
0xffff90b6a7a0>('        Traceback (most recent call last):\n          File 
"<string>", line 1, in <module>\n        ZeroDivisionError: division by zero\n  
      ')
 +        where <function dedent at 0xffff90b6a7a0> = textwrap.dedent
================== 1 failed, 73 passed, 71 warnings in 5.68s ===================
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pynvim/build; python3.13 -m pytest -vv
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pynvim/build; 
python3.12 -m pytest -vv
============================= test session starts ==============================
platform linux -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0 -- 
/usr/bin/python3.12
cachedir: .pytest_cache
rootdir: /<<PKGBUILDDIR>>
configfile: setup.cfg
plugins: typeguard-4.3.0
collecting ... collected 74 items

test/test_buffer.py::test_repr PASSED                                    [  1%]
test/test_buffer.py::test_get_length PASSED                              [  2%]
test/test_buffer.py::test_get_set_del_line PASSED                        [  4%]
test/test_buffer.py::test_get_set_del_slice PASSED                       [  5%]
test/test_buffer.py::test_vars PASSED                                    [  6%]
test/test_buffer.py::test_api PASSED                                     [  8%]
test/test_buffer.py::test_options PASSED                                 [  9%]
test/test_buffer.py::test_number PASSED                                  [ 10%]
test/test_buffer.py::test_name PASSED                                    [ 12%]
test/test_buffer.py::test_valid PASSED                                   [ 13%]
test/test_buffer.py::test_append PASSED                                  [ 14%]
test/test_buffer.py::test_mark PASSED                                    [ 16%]
test/test_buffer.py::test_invalid_utf8 PASSED                            [ 17%]
test/test_buffer.py::test_get_exceptions PASSED                          [ 18%]
test/test_buffer.py::test_set_items_for_range PASSED                     [ 20%]
test/test_buffer.py::test_update_highlights PASSED                       [ 21%]
test/test_buffer.py::test_buffer_inequality PASSED                       [ 22%]
test/test_client_rpc.py::test_call_and_reply PASSED                      [ 24%]
test/test_client_rpc.py::test_call_api_before_reply PASSED               [ 25%]
test/test_client_rpc.py::test_async_call PASSED                          [ 27%]
test/test_client_rpc.py::test_recursion PASSED                           [ 28%]
test/test_concurrency.py::test_interrupt_from_another_thread PASSED      [ 29%]
test/test_concurrency.py::test_exception_in_threadsafe_call PASSED       [ 31%]
test/test_decorators.py::test_command_count PASSED                       [ 32%]
test/test_events.py::test_receiving_events PASSED                        [ 33%]
test/test_events.py::test_sending_notify PASSED                          [ 35%]
test/test_events.py::test_async_error PASSED                             [ 36%]
test/test_events.py::test_broadcast PASSED                               [ 37%]
test/test_host.py::test_host_imports PASSED                              [ 39%]
test/test_host.py::test_host_import_rplugin_modules PASSED               [ 40%]
test/test_host.py::test_host_clientinfo PASSED                           [ 41%]
test/test_host.py::test_host_async_error PASSED                          [ 43%]
test/test_host.py::test_legacy_vim_eval PASSED                           [ 44%]
test/test_logging.py::test_setup_logging PASSED                          [ 45%]
test/test_tabpage.py::test_windows PASSED                                [ 47%]
test/test_tabpage.py::test_vars PASSED                                   [ 48%]
test/test_tabpage.py::test_valid PASSED                                  [ 50%]
test/test_tabpage.py::test_number PASSED                                 [ 51%]
test/test_tabpage.py::test_repr PASSED                                   [ 52%]
test/test_version.py::test_version PASSED                                [ 54%]
test/test_vim.py::test_clientinfo PASSED                                 [ 55%]
test/test_vim.py::test_command PASSED                                    [ 56%]
test/test_vim.py::test_command_output PASSED                             [ 58%]
test/test_vim.py::test_command_error PASSED                              [ 59%]
test/test_vim.py::test_eval PASSED                                       [ 60%]
test/test_vim.py::test_call PASSED                                       [ 62%]
test/test_vim.py::test_api PASSED                                        [ 63%]
test/test_vim.py::test_strwidth PASSED                                   [ 64%]
test/test_vim.py::test_chdir PASSED                                      [ 66%]
test/test_vim.py::test_current_line PASSED                               [ 67%]
test/test_vim.py::test_current_line_delete PASSED                        [ 68%]
test/test_vim.py::test_vars PASSED                                       [ 70%]
test/test_vim.py::test_options PASSED                                    [ 71%]
test/test_vim.py::test_local_options PASSED                              [ 72%]
test/test_vim.py::test_buffers PASSED                                    [ 74%]
test/test_vim.py::test_windows PASSED                                    [ 75%]
test/test_vim.py::test_tabpages PASSED                                   [ 77%]
test/test_vim.py::test_hash PASSED                                       [ 78%]
test/test_vim.py::test_python3 PASSED                                    [ 79%]
test/test_vim.py::test_python3_ex_eval PASSED                            [ 81%]
test/test_vim.py::test_python_cwd PASSED                                 [ 82%]
test/test_vim.py::test_lua PASSED                                        [ 83%]
test/test_window.py::test_buffer PASSED                                  [ 85%]
test/test_window.py::test_cursor PASSED                                  [ 86%]
test/test_window.py::test_height PASSED                                  [ 87%]
test/test_window.py::test_width PASSED                                   [ 89%]
test/test_window.py::test_vars PASSED                                    [ 90%]
test/test_window.py::test_options PASSED                                 [ 91%]
test/test_window.py::test_position PASSED                                [ 93%]
test/test_window.py::test_tabpage PASSED                                 [ 94%]
test/test_window.py::test_valid PASSED                                   [ 95%]
test/test_window.py::test_number PASSED                                  [ 97%]
test/test_window.py::test_handle PASSED                                  [ 98%]
test/test_window.py::test_repr PASSED                                    [100%]

=============================== warnings summary ===============================
.pybuild/cpython3_3.12_pynvim/build/test/test_buffer.py: 17 warnings
.pybuild/cpython3_3.12_pynvim/build/test/test_client_rpc.py: 4 warnings
.pybuild/cpython3_3.12_pynvim/build/test/test_concurrency.py: 2 warnings
.pybuild/cpython3_3.12_pynvim/build/test/test_events.py: 4 warnings
.pybuild/cpython3_3.12_pynvim/build/test/test_host.py: 5 warnings
.pybuild/cpython3_3.12_pynvim/build/test/test_tabpage.py: 5 warnings
.pybuild/cpython3_3.12_pynvim/build/test/test_vim.py: 22 warnings
.pybuild/cpython3_3.12_pynvim/build/test/test_window.py: 12 warnings
  /usr/lib/python3.12/asyncio/events.py:828: DeprecationWarning: 
'get_child_watcher' is deprecated as of Python 3.12 and will be removed in 
Python 3.14.
    return get_event_loop_policy().get_child_watcher()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================= 74 passed, 71 warnings in 5.36s ========================
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 
3.12" returned exit code 13
make: *** [debian/rules:7: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2024-09-20T17:11:33Z


If required, the full build log is available here (for the next 30 days):
https://debusine.debian.net/artifact/802306/

This bug has been filed at "normal" severity, as we haven't started the
transition to add 3.13 as a supported version, yet. This will be raised to RC
as soon as that happens, hopefully well before trixie.

Thanks,

Stefano

Reply via email to