Bug#1126290: highs: FTBFS with Python 3.14

Graham Inggs ginggs at debian.org
Fri Jan 23 17:53:27 GMT 2026


Source: highs
Version: 1.12.0+ds1-2
Severity: important
Tags: ftbfs patch
User: debian-python at lists.debian.org
Usertags: python3.14

Hi Maintainer

highs will FTBFS once Python 3.14 is the default version in Debian.
I've copied what I hope is the relevant part of the log below.

"'return' in a 'finally' block" should only be a SyntaxWarning for
Python 3.14, but upstream's pyproject.toml upgrades warnings to
errors.

This can be worked around as follows.

--- a/pyproject.toml
+++ b/pyproject.toml
@@ -197,7 +197,7 @@
 addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
 xfail_strict = true
 log_cli_level = "INFO"
-filterwarnings = ["error"]
+#filterwarnings = ["error"]
 testpaths = ["tests"]

 [tool.cibuildwheel]

While investigating this issue, I noticed that the pytest tests are
not run for amd64.  Compare for example a build log [1] for arm64 to
amd64, and search for the text 'test session starts'.

# set LD_LIBRARY_PATH to find compiled _core.so and libhighs.so
LD_LIBRARY_PATH=/tmp/highs-build/usr/lib/aarch64-linux-gnu dh_auto_test
I: pybuild base:386: cd
/build/reproducible-path/highs-1.12.0+ds1/.pybuild/cpython3_3.13_highspy/build;
python3.13 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /build/reproducible-path/highs-1.12.0+ds1/.pybuild/cpython3_3.13_highspy/build
configfile: pyproject.toml
collected 60 items

tests/test_highspy.py .................................................. [ 83%]
..........                                                               [100%]

============================== 60 passed in 0.37s ==============================

Regards
Graham


[1] https://buildd.debian.org/status/package.php?p=highs


____________________ ERROR collecting tests/test_highspy.py ____________________
/usr/lib/python3/dist-packages/_pytest/python.py:507: in importtestmodule
    mod = import_path(
/usr/lib/python3/dist-packages/_pytest/pathlib.py:587: in import_path
    importlib.import_module(module_name)
/usr/lib/python3.14/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib._bootstrap>:1398: in _gcd_import
    ???
<frozen importlib._bootstrap>:1371: in _find_and_load
    ???
<frozen importlib._bootstrap>:1342: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:938: in _load_unlocked
    ???
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:197: in exec_module
    exec(co, module.__dict__)
tests/test_highspy.py:3: in <module>
    import highspy
highspy/__init__.py:46: in <module>
    from .highs import Highs
E     File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_highspy/build/highspy/highs.py",
line 84
E       return t
E       ^^^^^^^^
E   SyntaxError: 'return' in a 'finally' block



More information about the debian-science-maintainers mailing list