Bug#1082315: spyder-kernels FTBFS with Python 3.13

Stefano Rivera stefanor at debian.org
Thu Sep 19 21:04:41 BST 2024


Source: spyder-kernels
Version: 2.5.0-2
Severity: normal
User: debian-python at lists.debian.org
Usertags: python3.13

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_spyder-kernels/build; python3.13 -m pytest --ignore customize/tests/test_umr.py -k "not test_dask_multiprocessing"
============================= test session starts ==============================
platform linux -- Python 3.13.0rc2, pytest-8.3.3, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>
plugins: flaky-3.8.1, typeguard-4.3.0
collected 93 items / 1 deselected / 92 selected

console/tests/test_console_kernel.py ....................s.F..........ss [ 38%]
ss...                                                                    [ 43%]
customize/tests/test_utils.py .                                          [ 44%]
utils/tests/test_dochelpers.py .......................                   [ 69%]
utils/tests/test_iofuncs.py ...........                                  [ 81%]
utils/tests/test_lazymodules.py ..                                       [ 83%]
utils/tests/test_nsview.py ...............                               [100%]

=================================== FAILURES ===================================
_______________________________ test_do_complete _______________________________

kernel = <spyder_kernels.console.kernel.SpyderKernel object at 0xffff87813450>

    def test_do_complete(kernel):
        """
        Check do complete works in normal and debugging mode.
        """
        if IPYKERNEL_6:
            asyncio.run(kernel.do_execute('abba = 1', True))
        else:
            kernel.do_execute('abba = 1', True)
        assert kernel.get_value('abba') == 1
        match = kernel.do_complete('ab', 2)
>       assert 'abba' in match['matches']
E       AssertionError: assert 'abba' in []

console/tests/test_console_kernel.py:838: AssertionError
----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/jedi/cache.py", line 110, in wrapper
    return dct[key]
           ~~~^^^^^
KeyError: ((), frozenset())

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/parso/grammar.py", line 252, in load_grammar
    return _loaded_grammars[path]
           ~~~~~~~~~~~~~~~~^^^^^^
KeyError: '/usr/lib/python3/dist-packages/parso/python/grammar313.txt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/parso/grammar.py", line 255, in load_grammar
    with open(path) as f:
         ~~~~^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/parso/python/grammar313.txt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/IPython/core/completer.py", line 3171, in _complete
    result = matcher(context)
  File "/usr/lib/python3/dist-packages/IPython/core/completer.py", line 2224, in _jedi_matcher
    matches = self._jedi_matches(
        cursor_column=context.cursor_position,
        cursor_line=context.cursor_line,
        text=context.full_text,
    )
  File "/usr/lib/python3/dist-packages/IPython/core/completer.py", line 2278, in _jedi_matches
    interpreter = jedi.Interpreter(text[:offset], namespaces)
  File "/usr/lib/python3/dist-packages/jedi/api/__init__.py", line 741, in __init__
    super().__init__(code, environment=environment, project=project, **kwds)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jedi/api/__init__.py", line 119, in __init__
    self._inference_state = InferenceState(
                            ~~~~~~~~~~~~~~^
        project, environment=environment, script_path=self.path
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/python3/dist-packages/jedi/inference/__init__.py", line 91, in __init__
    self.grammar = environment.get_grammar()
                   ~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/jedi/cache.py", line 112, in wrapper
    result = method(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/jedi/api/environment.py", line 37, in get_grammar
    return parso.load_grammar(version=version_string)
           ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/parso/grammar.py", line 264, in load_grammar
    raise NotImplementedError(message)
NotImplementedError: Python version 3.13 is currently not supported.
=============================== warnings summary ===============================
../../../../../../usr/lib/python3/dist-packages/jupyter_client/jsonutil.py:31
  /usr/lib/python3/dist-packages/jupyter_client/jsonutil.py:31: DeprecationWarning: Parsing dates involving a day of month without a year specified is ambiguious
  and fails to parse leap day. The default behavior will change in Python 3.15
  to either always raise an exception or to use a different default year (TBD).
  To avoid trouble, add a specific year to the input & format.
  See https://github.com/python/cpython/issues/70647.
    datetime.strptime("1", "%d")  # noqa

../../../../../../usr/lib/python3/dist-packages/jupyter_client/connect.py:22
  /usr/lib/python3/dist-packages/jupyter_client/connect.py:22: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
  given by the platformdirs library.  To remove this warning and
  see the appropriate new directories, set the environment variable
  `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
  The use of platformdirs will be the default in `jupyter_core` v6
    from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write

.pybuild/cpython3_3.13_spyder-kernels/build/console/tests/test_console_kernel.py::test_load_data
.pybuild/cpython3_3.13_spyder-kernels/build/console/tests/test_console_kernel.py::test_save_namespace
.pybuild/cpython3_3.13_spyder-kernels/build/utils/tests/test_iofuncs.py::test_spydata_import[export_data.spydata]
.pybuild/cpython3_3.13_spyder-kernels/build/utils/tests/test_iofuncs.py::test_spydata_import[export_data_renamed.spydata]
.pybuild/cpython3_3.13_spyder-kernels/build/utils/tests/test_iofuncs.py::test_spydata_import_witherror
.pybuild/cpython3_3.13_spyder-kernels/build/utils/tests/test_iofuncs.py::test_spydata_export[spydata_values-spydata_values-export_data_copy]
.pybuild/cpython3_3.13_spyder-kernels/build/utils/tests/test_iofuncs.py::test_spydata_export[namespace_objects_full-namespace_objects_filtered-export_data_2]
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_spyder-kernels/build/spyder_kernels/utils/iofuncs.py:390: DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.
    tar.extractall(path, members, numeric_owner=numeric_owner)

.pybuild/cpython3_3.13_spyder-kernels/build/utils/tests/test_nsview.py::test_get_type_string
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_spyder-kernels/build/utils/tests/test_nsview.py:345: PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
    matrix = np.matrix([[1, 2], [3, 4]])

.pybuild/cpython3_3.13_spyder-kernels/build/utils/tests/test_nsview.py::test_is_editable_type
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_spyder-kernels/build/utils/tests/test_nsview.py:400: PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
    matrix = np.matrix([[1, 2], [3, 4]])

.pybuild/cpython3_3.13_spyder-kernels/build/utils/tests/test_nsview.py::test_get_numpy_type
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_spyder-kernels/build/utils/tests/test_nsview.py:438: PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
    matrix = np.matrix([[1, 2], [3, 4]])

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
===Flaky Test Report===

test_cwd_in_sys_path passed 1 out of the required 1 times. Success!
test_multiprocessing passed 1 out of the required 1 times. Success!
test_multiprocessing_2 passed 1 out of the required 1 times. Success!
test_runfile passed 1 out of the required 1 times. Success!
test_np_threshold passed 1 out of the required 1 times. Success!
test_matplotlib_inline passed 1 out of the required 1 times. Success!
test_debug_namespace passed 1 out of the required 1 times. Success!

===End Flaky Test Report===
=========================== short test summary info ============================
FAILED console/tests/test_console_kernel.py::test_do_complete - AssertionErro...
===== 1 failed, 86 passed, 5 skipped, 1 deselected, 12 warnings in 38.09s ======
E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_spyder-kernels/build; python3.13 -m pytest --ignore customize/tests/test_umr.py -k "not test_dask_multiprocessing"
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_spyder-kernels/build; python3.12 -m pytest --ignore customize/tests/test_umr.py -k "not test_dask_multiprocessing"
============================= test session starts ==============================
platform linux -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>
plugins: flaky-3.8.1, typeguard-4.3.0
collected 93 items / 1 deselected / 92 selected

console/tests/test_console_kernel.py ....................s............ss [ 38%]
ss...                                                                    [ 43%]
customize/tests/test_utils.py .                                          [ 44%]
utils/tests/test_dochelpers.py .......................                   [ 69%]
utils/tests/test_iofuncs.py ...........                                  [ 81%]
utils/tests/test_lazymodules.py ..                                       [ 83%]
utils/tests/test_nsview.py ...............                               [100%]

=============================== warnings summary ===============================
../../../../../../usr/lib/python3/dist-packages/jupyter_client/connect.py:22
  /usr/lib/python3/dist-packages/jupyter_client/connect.py:22: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
  given by the platformdirs library.  To remove this warning and
  see the appropriate new directories, set the environment variable
  `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
  The use of platformdirs will be the default in `jupyter_core` v6
    from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write

.pybuild/cpython3_3.12_spyder-kernels/build/console/tests/test_console_kernel.py::test_load_data
.pybuild/cpython3_3.12_spyder-kernels/build/console/tests/test_console_kernel.py::test_save_namespace
.pybuild/cpython3_3.12_spyder-kernels/build/utils/tests/test_iofuncs.py::test_spydata_import[export_data.spydata]
.pybuild/cpython3_3.12_spyder-kernels/build/utils/tests/test_iofuncs.py::test_spydata_import[export_data_renamed.spydata]
.pybuild/cpython3_3.12_spyder-kernels/build/utils/tests/test_iofuncs.py::test_spydata_import_witherror
.pybuild/cpython3_3.12_spyder-kernels/build/utils/tests/test_iofuncs.py::test_spydata_export[spydata_values-spydata_values-export_data_copy]
.pybuild/cpython3_3.12_spyder-kernels/build/utils/tests/test_iofuncs.py::test_spydata_export[namespace_objects_full-namespace_objects_filtered-export_data_2]
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_spyder-kernels/build/spyder_kernels/utils/iofuncs.py:390: DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.
    tar.extractall(path, members, numeric_owner=numeric_owner)

.pybuild/cpython3_3.12_spyder-kernels/build/utils/tests/test_nsview.py::test_get_type_string
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_spyder-kernels/build/utils/tests/test_nsview.py:345: PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
    matrix = np.matrix([[1, 2], [3, 4]])

.pybuild/cpython3_3.12_spyder-kernels/build/utils/tests/test_nsview.py::test_is_editable_type
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_spyder-kernels/build/utils/tests/test_nsview.py:400: PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
    matrix = np.matrix([[1, 2], [3, 4]])

.pybuild/cpython3_3.12_spyder-kernels/build/utils/tests/test_nsview.py::test_get_numpy_type
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_spyder-kernels/build/utils/tests/test_nsview.py:438: PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
    matrix = np.matrix([[1, 2], [3, 4]])

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
===Flaky Test Report===

test_cwd_in_sys_path passed 1 out of the required 1 times. Success!
test_multiprocessing passed 1 out of the required 1 times. Success!
test_multiprocessing_2 passed 1 out of the required 1 times. Success!
test_runfile passed 1 out of the required 1 times. Success!
test_np_threshold passed 1 out of the required 1 times. Success!
test_matplotlib_inline passed 1 out of the required 1 times. Success!
test_debug_namespace passed 1 out of the required 1 times. Success!

===End Flaky Test Report===
========== 87 passed, 5 skipped, 1 deselected, 11 warnings in 37.26s ===========
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 3.12" returned exit code 13
make: *** [debian/rules:9: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2024-09-19T13:32:47Z


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

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



More information about the debian-science-maintainers mailing list