Bug#1114718: python-pymeasure: FTBFS with NumPy 2.3

roehling at debian.org roehling at debian.org
Mon Sep 8 20:44:38 BST 2025


Source: python-pymeasure
Version: 0.14.0-2
Severity: important
User: debian-python at lists.debian.org
Usertags: numpy2.3
Tags: ftbfs, forky, sid

Dear maintainer,

During a test rebuild for NumPy 2.3, python-pymeasure failed to rebuild.

Log Summary:
-------------------------------------------------------------------------------
[...]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pymeasure.adapters.protocol.ProtocolAdapter object at 0x7f30c72ee4e0>
header_bytes = 0, termination_bytes = None, dtype = <class 'numpy.uint8'>
kwargs = {}, binary = b'DAT2,#9000000002\x01\x01\n\n'
data = b'DAT2,#9000000002\x01\x01\n\n'

    def read_binary_values(self, header_bytes=0, termination_bytes=None,
                           dtype=np.float32, **kwargs):
        """ Returns a numpy array from a query for binary data
    
        :param int header_bytes: Number of bytes to ignore in header.
        :param int termination_bytes: Number of bytes to strip at end of message or None.
        :param dtype: The NumPy data type to format the values with.
        :param \\**kwargs: Further arguments for the NumPy fromstring method.
        :returns: NumPy array of values
        """
        binary = self.read_bytes(-1)
        # header = binary[:header_bytes]
        data = binary[header_bytes:termination_bytes]
>       return np.fromstring(data, dtype=dtype, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       ValueError: The binary mode of fromstring is removed, use frombuffer instead

pymeasure/adapters/adapter.py:232: ValueError
------------------------------ Captured log call -------------------------------
INFO     pymeasure.instruments.instrument:instrument.py:104 Initializing LeCroy T3DSO1204 Oscilloscope.
__________________ TestWaiting.test_binary_values_calls_wait ___________________

self = <test_instrument.TestWaiting object at 0x7f30eef7fe10>
instr = <test_instrument.TestWaiting.instr.<locals>.Faked object at 0x7f30cfcc5010>

    def test_binary_values_calls_wait(self, instr):
        instr.adapter.comm_pairs = [("abc", "abcdefgh")]
>       instr.binary_values("abc")

tests/instruments/test_instrument.py:234: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pymeasure/instruments/common_base.py:434: in binary_values
    return self.read_binary_values(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pymeasure/instruments/instrument.py:196: in read_binary_values
    return self.adapter.read_binary_values(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pymeasure.adapters.protocol.ProtocolAdapter object at 0x7f30cfac9e20>
header_bytes = 0, termination_bytes = None, dtype = <class 'numpy.float32'>
kwargs = {}, binary = b'abcdefgh', data = b'abcdefgh'

    def read_binary_values(self, header_bytes=0, termination_bytes=None,
                           dtype=np.float32, **kwargs):
        """ Returns a numpy array from a query for binary data
    
        :param int header_bytes: Number of bytes to ignore in header.
        :param int termination_bytes: Number of bytes to strip at end of message or None.
        :param dtype: The NumPy data type to format the values with.
        :param \\**kwargs: Further arguments for the NumPy fromstring method.
        :returns: NumPy array of values
        """
        binary = self.read_bytes(-1)
        # header = binary[:header_bytes]
        data = binary[header_bytes:termination_bytes]
>       return np.fromstring(data, dtype=dtype, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       ValueError: The binary mode of fromstring is removed, use frombuffer instead

pymeasure/adapters/adapter.py:232: ValueError
------------------------------ Captured log setup ------------------------------
INFO     pymeasure.instruments.instrument:instrument.py:104 Initializing faked.
=============================== warnings summary ===============================
tests/experiment/test_procedure.py::test_procedure_wrapper
tests/experiment/test_results.py::test_procedure_filestorage
  <frozen importlib._bootstrap>:530: DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.15; use exec_module() instead

tests/instruments/activetechnologies/test_AWG401x.py: 3 warnings
tests/instruments/advantest/test_advantestR624X.py: 3 warnings
tests/instruments/agilent/test_agilent33500.py: 31 warnings
tests/instruments/aimtti/test_aimttl.py: 8 warnings
tests/instruments/ametek/test_ametek7270.py: 107 warnings
tests/instruments/anritsu/test_anritsuMG3692C.py: 7 warnings
tests/instruments/anritsu/test_anritsuMS2090A.py: 3 warnings
tests/instruments/anritsu/test_anritsuMS464xB.py: 12 warnings
tests/instruments/hp/test_hp33120A.py: 23 warnings
tests/instruments/hp/test_hp34401a.py: 68 warnings
tests/instruments/keithley/test_keithley2000.py: 5 warnings
tests/instruments/keithley/test_keithley2200.py: 4 warnings
tests/instruments/keithley/test_keithley2306.py: 6 warnings
tests/instruments/lakeshore/test_lakeshore211.py: 7 warnings
tests/instruments/lecroy/test_lecroyT3DSO1204.py: 21 warnings
tests/instruments/lecroy/test_lecroyT3DSO1204_with_device.py: 1 warning
tests/instruments/parker/test_parkerGV6.py: 1 warning
tests/instruments/pendulum/test_cnt91.py: 27 warnings
tests/instruments/siglenttechnologies/test_siglent_spd1168x.py: 8 warnings
tests/instruments/siglenttechnologies/test_siglent_spd1305x.py: 5 warnings
tests/instruments/tektronix/test_afg3152.py: 2 warnings
tests/instruments/teledyne/test_teledyneMAUI.py: 5 warnings
tests/instruments/temptronic/test_temptronic_base.py: 1 warning
tests/instruments/test_all_instruments.py: 280 warnings
  /build/reproducible-path/python-pymeasure-0.14.0/.pybuild/cpython3_3.13_pymeasure/build/pymeasure/instruments/generic_types.py:110: FutureWarning: It is not known whether this device support SCPI commands or not. Please inform the pymeasure maintainers if you know the answer.
    warn("It is not known whether this device support SCPI commands or not. Please inform "

tests/instruments/activetechnologies/test_AWG401x.py: 3 warnings
tests/instruments/test_all_instruments.py: 1 warning
tests/instruments/test_channel.py: 10 warnings
tests/instruments/test_connection_configuration.py: 2 warnings
tests/instruments/test_instrument.py: 20 warnings
tests/test_expected_protocol.py: 10 warnings
tests/test_generator.py: 5 warnings
  /build/reproducible-path/python-pymeasure-0.14.0/.pybuild/cpython3_3.13_pymeasure/build/pymeasure/instruments/instrument.py:95: FutureWarning: It is deprecated to specify `includeSCPI` implicitly, use `includeSCPI=False` or inherit the `SCPIMixin` class instead.
    warn("It is deprecated to specify `includeSCPI` implicitly, use "

tests/instruments/thyracont/test_smartline_v2.py: 37 warnings
  /build/reproducible-path/python-pymeasure-0.14.0/.pybuild/cpython3_3.13_pymeasure/build/pymeasure/adapters/protocol.py:143: UserWarning: Breaking on termination character in `read_bytes` cannot be tested. You have to separate the message parts in the com_pairs.
    warn(("Breaking on termination character in `read_bytes` cannot be tested. "

tests/instruments/toptica/test_ibeamsmart.py::test_setting_failed
  /build/reproducible-path/python-pymeasure-0.14.0/.pybuild/cpython3_3.13_pymeasure/build/pymeasure/instruments/toptica/ibeamsmart.py:57: FutureWarning: This property is deprecated, use channels instead.
    warn("This property is deprecated, use channels instead.", FutureWarning)

tests/test_process.py::test_process_stopping
tests/test_process.py::test__process_joining
  /usr/lib/python3.13/multiprocessing/popen_fork.py:67: DeprecationWarning: This process (pid=107) is multi-threaded, use of fork() may lead to deadlocks in the child.
    self.pid = os.fork()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/adapters/test_adapter.py::test_binary_values_deprecation_warning
FAILED tests/instruments/lecroy/test_lecroyT3DSO1204.py::test_download_one_point
FAILED tests/instruments/lecroy/test_lecroyT3DSO1204.py::test_download_two_points
FAILED tests/instruments/test_instrument.py::TestWaiting::test_binary_values_calls_wait
= 4 failed, 2300 passed, 809 skipped, 3770 deselected, 1 xfailed, 731 warnings in 14.50s =
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /build/reproducible-path/python-pymeasure-0.14.0/.pybuild/cpython3_3.13_pymeasure/build; python3.13 -m pytest -k 'not (test_property_docstrings or test_locale_settings)'
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.13 returned exit code 13
make: *** [debian/rules:12: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2025-09-08T08:25:50Z

-------------------------------------------------------------------------------

The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here (for the next 30 days):
https://debusine.debian.net/debian/developers-roehling.numpy/artifact/2455444/

About the archive rebuild: The build was made on debusine.debian.net,
using sbuild.

You can find the build task here:
https://debusine.debian.net/debian/developers-roehling.numpy/work-request/163938/

If this is really a bug in one of the build-depends, please use
reassign and affects, so that this is still visible in the BTS web
page for this package.

Cheers
Timo



More information about the debian-science-maintainers mailing list