Package: src:pyvisa
Version: 1.14.1-1
User: [email protected]
Usertags: python3.15
Tags: patch, ftbfs, forky, sid
Severity: important

Hi!

While rebuilding the python related packages against the Python 3.15rc2
version we found that pyvisa fails to build from source [1].
The error is:
      assert "unsupported format character" in ex.exconly()
E       AssertionError: assert 'unsupported format character' in 'ValueError: 
unsupported format %m at position 0'
E        +  where 'ValueError: unsupported format %m at position 0' = exconly()
E        +    where exconly = <ExceptionInfo ValueError('unsupported format %m at 
position 0') tblen=3>.exconly

This is due to the fact that exception texts were improved in python
3.15, so the test needs to be updated. I have created a patch to do
this, which should be forwarded upstream.

I've applied the fix in the sandbox [2] to verify that it builds
successfully, please consider applying the patch to support the upcoming
3.15 version.

Setting the severity to important for now. Once Python 3.15 is released,
it will be added to python3-defaults and this bug will become release
critical.

Happy hacking,

[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4429734/
[2]: https://debusine.debian.net/debian/r-python-python3.15/

--
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/
Description: Fix test_invalid_string_converter for Python 3.15
 In Python 3.15, the ValueError message for unsupported % formatting
 codes changed from "unsupported format character..." to "unsupported format...".
 Check for "unsupported format" instead.
Author: Maximiliano Curia <[email protected]>
Forwarded: not-needed
Last-Update: 2026-09-07

Index: pyvisa/pyvisa/testsuite/test_util.py
===================================================================
--- pyvisa.orig/pyvisa/testsuite/test_util.py
+++ pyvisa/pyvisa/testsuite/test_util.py
@@ -234,7 +234,7 @@ class TestParser(BaseTestCase):
     def test_invalid_string_converter(self):
         with pytest.raises(ValueError) as ex:
             util.to_ascii_block([1, 2], "m")
-        assert "unsupported format character" in ex.exconly()
+        assert "unsupported format" in ex.exconly()
         with pytest.raises(ValueError) as ex:
             util.from_ascii_block("1,2,3", "m")
         assert "Invalid code for converter" in ex.exconly()

Reply via email to