Bug#1082258: python-pymeasure FTBFS with Python 3.13

Stefano Rivera stefanor at debian.org
Thu Sep 19 15:18:37 BST 2024


Source: python-pymeasure
Version: 0.9.0-2
Severity: normal
Tags: fixed-upstream
User: debian-python at lists.debian.org
Usertags: python3.13
Forwarded: https://github.com/pymeasure/pymeasure/issues/668

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
telnetlib was removed in 3.13.

This should be resolved upstream in >= 0.12.

Log snippet:

   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pymeasure/build; python3.13 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.13.0rc2, pytest-8.3.3, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>
plugins: typeguard-4.3.0
collected 62 items / 7 errors

==================================== ERRORS ====================================
_ ERROR collecting .pybuild/cpython3_3.13_pymeasure/build/tests/adapters/test_adapter.py _
ImportError while importing test module '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pymeasure/build/tests/adapters/test_adapter.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/adapters/test_adapter.py:27: in <module>
    from pymeasure.adapters import FakeAdapter
pymeasure/adapters/__init__.py:47: in <module>
    from pymeasure.adapters.telnet import TelnetAdapter
pymeasure/adapters/telnet.py:25: in <module>
    import telnetlib
E   ModuleNotFoundError: No module named 'telnetlib'
_ ERROR collecting .pybuild/cpython3_3.13_pymeasure/build/tests/adapters/test_visa.py _
ImportError while importing test module '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pymeasure/build/tests/adapters/test_visa.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/adapters/test_visa.py:29: in <module>
    from pymeasure.adapters import VISAAdapter
pymeasure/adapters/__init__.py:47: in <module>
    from pymeasure.adapters.telnet import TelnetAdapter
pymeasure/adapters/telnet.py:25: in <module>
    import telnetlib
E   ModuleNotFoundError: No module named 'telnetlib'
_ ERROR collecting .pybuild/cpython3_3.13_pymeasure/build/tests/instruments/agilent/test_agilent34450A.py _
ImportError while importing test module '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pymeasure/build/tests/instruments/agilent/test_agilent34450A.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/instruments/agilent/test_agilent34450A.py:26: in <module>
    from pymeasure.instruments.agilent.agilent34450A import Agilent34450A
pymeasure/instruments/__init__.py:26: in <module>
    from .instrument import Instrument
pymeasure/instruments/instrument.py:30: in <module>
    from pymeasure.adapters import FakeAdapter
pymeasure/adapters/__init__.py:47: in <module>
    from pymeasure.adapters.telnet import TelnetAdapter
pymeasure/adapters/telnet.py:25: in <module>
    import telnetlib
E   ModuleNotFoundError: No module named 'telnetlib'
_ ERROR collecting .pybuild/cpython3_3.13_pymeasure/build/tests/instruments/keithley/test_keithley2750.py _
ImportError while importing test module '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pymeasure/build/tests/instruments/keithley/test_keithley2750.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/instruments/keithley/test_keithley2750.py:26: in <module>
    from pymeasure.instruments.keithley.keithley2750 import clean_closed_channels
pymeasure/instruments/__init__.py:26: in <module>
    from .instrument import Instrument
pymeasure/instruments/instrument.py:30: in <module>
    from pymeasure.adapters import FakeAdapter
pymeasure/adapters/__init__.py:47: in <module>
    from pymeasure.adapters.telnet import TelnetAdapter
pymeasure/adapters/telnet.py:25: in <module>
    import telnetlib
E   ModuleNotFoundError: No module named 'telnetlib'
_ ERROR collecting .pybuild/cpython3_3.13_pymeasure/build/tests/instruments/keysight/test_keysightDSOX1102G.py _
ImportError while importing test module '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pymeasure/build/tests/instruments/keysight/test_keysightDSOX1102G.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/instruments/keysight/test_keysightDSOX1102G.py:30: in <module>
    from pymeasure.instruments.keysight.keysightDSOX1102G import KeysightDSOX1102G
pymeasure/instruments/__init__.py:26: in <module>
    from .instrument import Instrument
pymeasure/instruments/instrument.py:30: in <module>
    from pymeasure.adapters import FakeAdapter
pymeasure/adapters/__init__.py:47: in <module>
    from pymeasure.adapters.telnet import TelnetAdapter
pymeasure/adapters/telnet.py:25: in <module>
    import telnetlib
E   ModuleNotFoundError: No module named 'telnetlib'
_ ERROR collecting .pybuild/cpython3_3.13_pymeasure/build/tests/instruments/test_instrument.py _
ImportError while importing test module '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pymeasure/build/tests/instruments/test_instrument.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/instruments/test_instrument.py:26: in <module>
    from pymeasure.adapters import FakeAdapter
pymeasure/adapters/__init__.py:47: in <module>
    from pymeasure.adapters.telnet import TelnetAdapter
pymeasure/adapters/telnet.py:25: in <module>
    import telnetlib
E   ModuleNotFoundError: No module named 'telnetlib'
_ ERROR collecting .pybuild/cpython3_3.13_pymeasure/build/tests/instruments/test_validators.py _
ImportError while importing test module '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pymeasure/build/tests/instruments/test_validators.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/instruments/test_validators.py:26: in <module>
    from pymeasure.instruments.validators import (
pymeasure/instruments/__init__.py:26: in <module>
    from .instrument import Instrument
pymeasure/instruments/instrument.py:30: in <module>
    from pymeasure.adapters import FakeAdapter
pymeasure/adapters/__init__.py:47: in <module>
    from pymeasure.adapters.telnet import TelnetAdapter
pymeasure/adapters/telnet.py:25: in <module>
    import telnetlib
E   ModuleNotFoundError: No module named 'telnetlib'
=============================== warnings summary ===============================
pymeasure/adapters/visa.py:30
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pymeasure/build/pymeasure/adapters/visa.py:30: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import parse_version

<frozen importlib._bootstrap>:530
  <frozen importlib._bootstrap>:530: DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
ERROR tests/adapters/test_adapter.py
ERROR tests/adapters/test_visa.py
ERROR tests/instruments/agilent/test_agilent34450A.py
ERROR tests/instruments/keithley/test_keithley2750.py
ERROR tests/instruments/keysight/test_keysightDSOX1102G.py
ERROR tests/instruments/test_instrument.py
ERROR tests/instruments/test_validators.py
!!!!!!!!!!!!!!!!!!! Interrupted: 7 errors during collection !!!!!!!!!!!!!!!!!!!!
======================== 2 warnings, 7 errors in 1.13s =========================
E: pybuild pybuild:389: test: plugin distutils failed with: exit code=2: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pymeasure/build; python3.13 -m pytest tests
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pymeasure/build; python3.12 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>
plugins: typeguard-4.3.0
collected 85 items / 3 skipped

tests/adapters/test_adapter.py ..                                        [  2%]
tests/display/test_inputs.py ssssssssssssssssssssssssssssssss            [ 40%]
tests/experiment/test_parameters.py ..........                           [ 51%]
tests/experiment/test_procedure.py ..                                    [ 54%]
tests/experiment/test_results.py .......                                 [ 62%]
tests/experiment/test_workers.py ....                                    [ 67%]
tests/instruments/keithley/test_keithley2750.py .                        [ 68%]
tests/instruments/test_instrument.py ............                        [ 82%]
tests/instruments/test_validators.py ........                            [ 91%]
tests/test_log.py ...                                                    [ 95%]
tests/test_process.py ..                                                 [ 97%]
tests/test_thread.py ..                                                  [100%]

=============================== warnings summary ===============================
pymeasure/adapters/visa.py:30
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pymeasure/build/pymeasure/adapters/visa.py:30: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import parse_version

pymeasure/adapters/telnet.py:25
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pymeasure/build/pymeasure/adapters/telnet.py:25: DeprecationWarning: 'telnetlib' is deprecated and slated for removal in Python 3.13
    import telnetlib

<frozen importlib._bootstrap>:530
.pybuild/cpython3_3.12_pymeasure/build/tests/experiment/test_procedure.py::test_procedure_wrapper
.pybuild/cpython3_3.12_pymeasure/build/tests/experiment/test_results.py::test_procedure_wrapper
  <frozen importlib._bootstrap>:530: DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================== 53 passed, 35 skipped, 5 warnings in 1.60s ==================
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-19T06:34:40Z


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

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