Package: src:home-assistant-bluetooth
Version: 1.13.1-1
Severity: serious
Tags: ftbfs trixie sid

Dear maintainer:

During a rebuild of all packages in unstable, your package failed to build:

--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --buildsystem=pybuild
   dh_auto_clean -O--buildsystem=pybuild
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
 debian/rules binary
dh binary --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
   dh_auto_build -O--buildsystem=pybuild
I: pybuild plugin_pyproject:129: Building wheel for python3.13 with "build" 
module
I: pybuild base:311: python3.13 -m build --skip-dependency-check --no-isolation 
--wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13  
* Building wheel...
Successfully built home_assistant_bluetooth-1.13.1-py3-none-any.whl
I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.13 with 
"installer" module
   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build; 
python3.13 -m pytest --no-cov
============================= test session starts ==============================
platform linux -- Python 3.13.3, pytest-8.3.5, pluggy-1.5.0 -- 
/usr/bin/python3.13
cachedir: .pytest_cache
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build
configfile: pyproject.toml
plugins: typeguard-4.4.2, cov-5.0.0
collecting ... collected 6 items

tests/test_models.py::test_model PASSED                                  [ 16%]
tests/test_models.py::test_model_from_bleak PASSED                       [ 33%]
tests/test_models.py::test_model_from_scanner FAILED                     [ 50%]
tests/test_models.py::test_construct_service_info_bleak FAILED           [ 66%]
tests/test_models.py::test_from_device_and_advertisement_data FAILED     [ 83%]
tests/test_models.py::test_pyobjc_compat FAILED                          [100%]

=================================== FAILURES ===================================
___________________________ test_model_from_scanner ____________________________

    def test_model_from_scanner():
        switchbot_device = BLEDevice("44:44:33:11:23:45", "wohand", {}, -127)
        switchbot_adv = generate_advertisement_data(
            local_name="wohand", 
service_uuids=["cba20d00-224d-11e6-9fb8-0002a5d5c51b"]
        )
        now = time.monotonic()
        service_info = BluetoothServiceInfoBleak.from_scan(
            SOURCE_LOCAL, switchbot_device, switchbot_adv, now, True
        )
    
        assert service_info.service_uuids == 
["cba20d00-224d-11e6-9fb8-0002a5d5c51b"]
        assert service_info.name == "wohand"
        assert service_info.source == SOURCE_LOCAL
        assert service_info.manufacturer is None
        assert service_info.manufacturer_id is None
        assert service_info.time == now
        assert service_info.connectable is True
    
        safe_as_dict = service_info.as_dict()
>       assert safe_as_dict == {
            "address": "44:44:33:11:23:45",
            "advertisement": switchbot_adv,
            "device": switchbot_device,
            "connectable": True,
            "manufacturer_data": {},
            "name": "wohand",
            "rssi": -127,
            "service_data": {},
            "service_uuids": ["cba20d00-224d-11e6-9fb8-0002a5d5c51b"],
            "source": "local",
            "time": now,
            "tx_power": -127,
        }
E       AssertionError: assert {'address': '... wohand), ...} == {'address': 
'... wohand), ...}
E         
E         Omitting 12 identical items, use -vv to show
E         Left contains 1 more item:
E         {'raw': None}
E         
E         Full diff:
E           {...
E         
E         ...Full output truncated (16 lines hidden), use '-vv' to show

tests/test_models.py:79: AssertionError
______________________ test_construct_service_info_bleak _______________________

    def test_construct_service_info_bleak():
        switchbot_device = BLEDevice("44:44:33:11:23:45", "wohand", {}, -127)
        switchbot_adv = generate_advertisement_data(
            local_name="wohand", 
service_uuids=["cba20d00-224d-11e6-9fb8-0002a5d5c51b"]
        )
        now = time.monotonic()
        service_info = BluetoothServiceInfoBleak(
            name="wohand",
            address="44:44:33:11:23:45",
            rssi=-127,
            manufacturer_data=switchbot_adv.manufacturer_data,
            service_data=switchbot_adv.service_data,
            service_uuids=switchbot_adv.service_uuids,
            source=SOURCE_LOCAL,
            device=switchbot_device,
            advertisement=switchbot_adv,
            connectable=False,
            time=now,
            tx_power=None,
        )
    
        assert service_info.service_uuids == 
["cba20d00-224d-11e6-9fb8-0002a5d5c51b"]
        assert service_info.name == "wohand"
        assert service_info.source == SOURCE_LOCAL
        assert service_info.manufacturer is None
        assert service_info.manufacturer_id is None
        assert service_info.time == now
        assert service_info.connectable is False
    
        safe_as_dict = service_info.as_dict()
>       assert safe_as_dict == {
            "address": "44:44:33:11:23:45",
            "advertisement": switchbot_adv,
            "device": switchbot_device,
            "connectable": False,
            "manufacturer_data": {},
            "name": "wohand",
            "rssi": -127,
            "service_data": {},
            "service_uuids": ["cba20d00-224d-11e6-9fb8-0002a5d5c51b"],
            "source": "local",
            "time": now,
            "tx_power": None,
        }
E       AssertionError: assert {'address': '... wohand), ...} == {'address': 
'... wohand), ...}
E         
E         Omitting 12 identical items, use -vv to show
E         Left contains 1 more item:
E         {'raw': None}
E         
E         Full diff:
E           {...
E         
E         ...Full output truncated (16 lines hidden), use '-vv' to show

tests/test_models.py:125: AssertionError
___________________ test_from_device_and_advertisement_data ____________________

    def test_from_device_and_advertisement_data():
        """Test creating a BluetoothServiceInfoBleak from a BLEDevice and 
AdvertisementData."""
        switchbot_device = BLEDevice("44:44:33:11:23:45", "wohand", {}, -127)
        switchbot_adv = generate_advertisement_data(
            local_name="wohand", 
service_uuids=["cba20d00-224d-11e6-9fb8-0002a5d5c51b"]
        )
        now_monotonic = time.monotonic()
        service_info = 
BluetoothServiceInfoBleak.from_device_and_advertisement_data(
            switchbot_device, switchbot_adv, SOURCE_LOCAL, now_monotonic, True
        )
    
        assert service_info.service_uuids == 
["cba20d00-224d-11e6-9fb8-0002a5d5c51b"]
        assert service_info.name == "wohand"
        assert service_info.source == SOURCE_LOCAL
        assert service_info.manufacturer is None
        assert service_info.manufacturer_id is None
    
        safe_as_dict = service_info.as_dict()
>       assert safe_as_dict == {
            "address": "44:44:33:11:23:45",
            "advertisement": switchbot_adv,
            "device": switchbot_device,
            "connectable": True,
            "manufacturer_data": {},
            "name": "wohand",
            "rssi": -127,
            "service_data": {},
            "service_uuids": ["cba20d00-224d-11e6-9fb8-0002a5d5c51b"],
            "source": "local",
            "time": now_monotonic,
            "tx_power": -127,
        }
E       AssertionError: assert {'address': '... wohand), ...} == {'address': 
'... wohand), ...}
E         
E         Omitting 12 identical items, use -vv to show
E         Left contains 1 more item:
E         {'raw': None}
E         
E         Full diff:
E           {...
E         
E         ...Full output truncated (16 lines hidden), use '-vv' to show

tests/test_models.py:159: AssertionError
______________________________ test_pyobjc_compat ______________________________

    def test_pyobjc_compat():
        class pyobjc_str(str):
            pass
    
        class pyobjc_int(int):
            pass
    
        name = pyobjc_str("wohand")
        address = pyobjc_str("44:44:33:11:23:45")
        rssi = pyobjc_int(-127)
    
        assert name == "wohand"
        assert address == "44:44:33:11:23:45"
        assert rssi == -127
    
        switchbot_device = BLEDevice(address, name, {}, rssi)
        switchbot_adv = generate_advertisement_data(
            local_name=name, 
service_uuids=["cba20d00-224d-11e6-9fb8-0002a5d5c51b"]
        )
        now = time.monotonic()
        service_info = BluetoothServiceInfoBleak(
            name=str(name),
            address=str(address),
            rssi=rssi,
            manufacturer_data=switchbot_adv.manufacturer_data,
            service_data=switchbot_adv.service_data,
            service_uuids=switchbot_adv.service_uuids,
            source=SOURCE_LOCAL,
            device=switchbot_device,
            advertisement=switchbot_adv,
            connectable=False,
            time=now,
            tx_power=None,
        )
    
        assert service_info.service_uuids == 
["cba20d00-224d-11e6-9fb8-0002a5d5c51b"]
        assert service_info.name == "wohand"
        assert service_info.source == SOURCE_LOCAL
        assert service_info.manufacturer is None
        assert service_info.manufacturer_id is None
        assert service_info.time == now
        assert service_info.connectable is False
    
        safe_as_dict = service_info.as_dict()
>       assert safe_as_dict == {
            "address": "44:44:33:11:23:45",
            "advertisement": switchbot_adv,
            "device": switchbot_device,
            "connectable": False,
            "manufacturer_data": {},
            "name": "wohand",
            "rssi": -127,
            "service_data": {},
            "service_uuids": ["cba20d00-224d-11e6-9fb8-0002a5d5c51b"],
            "source": "local",
            "time": now,
            "tx_power": None,
        }
E       AssertionError: assert {'address': '... wohand), ...} == {'address': 
'... wohand), ...}
E         
E         Omitting 12 identical items, use -vv to show
E         Left contains 1 more item:
E         {'raw': None}
E         
E         Full diff:
E           {...
E         
E         ...Full output truncated (16 lines hidden), use '-vv' to show

tests/test_models.py:219: AssertionError
=========================== short test summary info ============================
FAILED tests/test_models.py::test_model_from_scanner - AssertionError: assert...
FAILED tests/test_models.py::test_construct_service_info_bleak - AssertionErr...
FAILED tests/test_models.py::test_from_device_and_advertisement_data - Assert...
FAILED tests/test_models.py::test_pyobjc_compat - AssertionError: assert {'ad...
========================= 4 failed, 2 passed in 0.07s ==========================
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build; python3.13 -m pytest --no-cov
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.13 
returned exit code 13
make: *** [debian/rules:6: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------

The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:

https://people.debian.org/~sanvila/build-logs/202505/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you could not reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:home-assistant-bluetooth, so that this is 
still
visible in the BTS web page for this package.

Thanks.

Reply via email to