Avatar for the Bluetooth-Devices user
Bluetooth-Devices
dbus-fast
BlogDocsChangelog

fix: construct child proxy objects using correct paths and introspection

#495
Comparing
whitslack:fix-get_children
(
ff057e2
) with
main
(
8679747
)
CodSpeed Performance Gauge
0%
Improvements
0
Regressions
0
Untouched
6
New
0
Dropped
0
Ignored
0

Benchmarks

Passed

test_unmarshall_multiple_bluez_properties_message
tests/benchmarks/test_unmarshall.py::test_unmarshall_multiple_bluez_properties_message
CodSpeed Performance Gauge
+1%
95.8 µs
95 µs
test_unmarshall_bluez_properties_message
tests/benchmarks/test_unmarshall.py::test_unmarshall_bluez_properties_message
CodSpeed Performance Gauge
+1%
42.6 µs
42.4 µs
test_marshall_bluez_get_managed_objects_message
tests/benchmarks/test_marshall.py::test_marshall_bluez_get_managed_objects_message
CodSpeed Performance Gauge
0%
68.6 µs
68.6 µs
test_unmarshall_multiple_bluez_properties_message_socket
tests/benchmarks/test_unmarshall.py::test_unmarshall_multiple_bluez_properties_message_socket
CodSpeed Performance Gauge
0%
97.5 µs
97.5 µs
test_unmarshall_bluez_rssi_message
tests/benchmarks/test_unmarshall.py::test_unmarshall_bluez_rssi_message
CodSpeed Performance Gauge
0%
43.8 µs
44 µs
test_unmarshall_bluez_interfaces_added_message
tests/benchmarks/test_unmarshall.py::test_unmarshall_bluez_interfaces_added_message
CodSpeed Performance Gauge
0%
65.6 µs
65.9 µs

Commits

Click on a commit to change the comparison range
Base
main
8679747
-0.25%
BaseProxyObject: lazily introspect children as needed The D-Bus specification says: “If a child <node> has any sub-elements, then they must represent a complete introspection of the child. If a child <node> is empty, then it may or may not have sub-elements; the child must be introspected in order to find out. The intent is that if an object knows that its children are "fast" to introspect it can go ahead and return their information, but otherwise it can omit it.” However, BaseProxyObject.get_children() has been assuming that all child <node> elements provide a complete introspection of their corresponding child objects. This causes child objects to appear to have no interfaces or children of their own, even when they in fact do. To implement the spec, replace BaseProxyObject.introspection with a lazily-computed property whose value is initialized as the intr.Node passed to the BaseProxyObject constructor (or parsed by it), if one was specified, or is otherwise computed upon first use by introspecting the child object (synchronously). The synchronous introspection required pulling the introspect_sync method up from glib.MessageBus into BaseMessageBus as an abstract method and then implementing it in aio.MessageBus by using asyncio.loop.run_until_complete(…).
5f5ae14
6 days ago
by whitslack
+0.06%
chore(pre-commit.ci): auto fixes
0e7170c
6 days ago
by pre-commit-ci[bot]
+0.25%
chore: small fixes for python 3.9
1ca8a94
6 days ago
by bdraco
+0.37%
chore: fix introspection test on 3.9
e67505b
6 days ago
by bdraco
-0.34%
chore: alternative name owner tracking defeat to appease Cython Cython demands that a dict-typed object really be a dict and not a subclass, presumably because it wants to shortcut the virtual dispatch and implement all the methods in native code. Thus, my first attempt at defeating the name owner tracking in MessageBus was a non-starter. This commit switches to a different strategy: pre-filling the mapping so that get_interface() won't try to shoot off a GetNameOwner call to the bus.
ff057e2
6 days ago
by whitslack
© 2025 CodSpeed Technology
Home Terms Privacy Docs