Skip to content

fix: construct child proxy objects using correct paths and introspection #1953

fix: construct child proxy objects using correct paths and introspection

fix: construct child proxy objects using correct paths and introspection #1953

Triggered via pull request November 7, 2025 20:19
Status Failure
Total duration 28m 5s
Artifacts

ci.yml

on: pull_request
Matrix: test
lint
22s
lint
Lint Commit Messages
14s
Lint Commit Messages
release
release
Matrix: build_wheels
upload_pypi
0s
upload_pypi
Fit to window
Zoom out
Zoom in

Annotations

1 error
Lint Commit Messages
You have commit messages with errors ⧗ input: aio.ProxyObject: fix copy/paste oversight in doc ✖ subject may not be empty [subject-empty] ✖ type may not be empty [type-empty] ✖ found 2 problems, 0 warnings ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint ⧗ input: add unit tests of BaseProxyObject.get_children() These tests currently fail due to one bug and one deficiency in BaseProxyObject.get_children(): * Child proxy objects are constructed using the parent object's path. Thus, all calls to methods or accesses to properties of the child object are erroneously directed to the parent object. * Child proxy objects are constructed using the child Node from the parent's introspection. However, the parent might not provide introspection of its children. 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.” When the parent object omits introspection of a child object, the corresponding proxy object is erroneously constructed without any interfaces or children of its own. ✖ subject may not be empty [subject-empty] ✖ type may not be empty [type-empty] ✖ found 2 problems, 0 warnings ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint ⧗ input: BaseProxyObject: construct child proxy objects with correct paths BaseProxyObject.get_children() was constructing child proxy objects using the parent object's path. This commit corrects that. ✖ type must be lower-case [type-case] ✖ type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum] ✖ found 2 problems, 0 warnings ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint ⧗ input: 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(…). ✖ type must be lower-case [type-case] ✖ type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum] ✖ found 2 problems, 0 warnings ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint ⧗ input: BaseProxyObject: do not lazily introspect children Make the user do it if they need child objects to be populated. See: https://github.com/Bluetooth-Devices/dbus-fast/pull/495#pullrequestreview-3194620590 ✖ type must be lower-case [type-case] ✖ type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum] ✖ fo