Closed msftcangoblowm closed 2 years ago
This method is not intended to require annotations because the type information is in the introspection XML. Would you please investigate the root cause of the issue? A failing test would be nice. Fixing it would be better. Thanks.
Compared:
Both pass condition len(fn_signature.parameters) != len(intr_signal.args)
. So i was mistaken.
if signal handler annotation is provided, isn't checked with the annotation of the args.
In python
In DBus
Do you want to compare annotations if annotations are provided?
In which case, i'm willing to create the fix
The library always does this. Types are checked against the introspection XML in the high level client (second time saying htis). In the low level client, the signature of the message is always guaranteed to match the body. If this is ever not the case, you may report the bug.
In Client Interface, signal handlers must specify the signature. This can be confirmed in
proxy_object.BaseProxyInterface:_addSignal
decorator.So if the signal handlers doesn't contain a matching signature then a
TypeError
is supposed to be thrown. My experience: never saw aTypeError
get thrown!Therefore, without looking at the source code, there is no way to know why normal signals aren't being triggered.
For example,
Will never be triggered.
Will get triggered.
on_property_changed
actually does get triggered! Even without the signature. Which only indicates thatorg.freedesktop.DBus.Properties.PropertyChanged
signal handling is handled separately.Please update the misleading Client Interface documentation, so signal handling is intuitive.