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
(
fca806f
) with
main
(
e4d5164
)
CodSpeed Performance Gauge
0%
Untouched
6

Benchmarks

Passed

test_marshall_bluez_get_managed_objects_message
tests/benchmarks/test_marshall.py::test_marshall_bluez_get_managed_objects_message
CodSpeed Performance Gauge
+2%
68.6 µs67 µs
test_unmarshall_bluez_rssi_message
tests/benchmarks/test_unmarshall.py::test_unmarshall_bluez_rssi_message
CodSpeed Performance Gauge
0%
43.8 µs43.7 µs
test_unmarshall_bluez_properties_message
tests/benchmarks/test_unmarshall.py::test_unmarshall_bluez_properties_message
CodSpeed Performance Gauge
0%
42.6 µs42.5 µ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 µs97.6 µs
test_unmarshall_multiple_bluez_properties_message
tests/benchmarks/test_unmarshall.py::test_unmarshall_multiple_bluez_properties_message
CodSpeed Performance Gauge
0%
95.8 µs96.1 µs
test_unmarshall_bluez_interfaces_added_message
tests/benchmarks/test_unmarshall.py::test_unmarshall_bluez_interfaces_added_message
CodSpeed Performance Gauge
-1%
65.6 µs66 µs

Commits

Click on a commit to change the comparison range
Base
main
e4d5164
-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
26 days ago
by whitslack
+0.06%
chore(pre-commit.ci): auto fixes
0e7170c
26 days ago
by pre-commit-ci[bot]
+0.25%
chore: small fixes for python 3.9
1ca8a94
26 days ago
by bdraco
+0.37%
chore: fix introspection test on 3.9
e67505b
26 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
26 days ago
by whitslack
+0.23%
chore(pre-commit.ci): auto fixes
fca806f
15 days ago
by pre-commit-ci[bot]
© 2025 CodSpeed Technology
Home Terms Privacy Docs