does not use dbus.Struct.signature to guess signature of a Struct
Submitted by Simon McVittie
Assigned to Simon McVittie
Description
import dbus dbus.lowlevel.Message.guess_signature((42,)) dbus.Signature('(i)') dbus.lowlevel.Message.guess_signature(dbus.Struct((42,), signature='u')) dbus.Signature('(i)')
The second one should clearly be dbus.Signature('(u)').
Workaround: use a tuple containing fully-qualified dbus types:
dbus.lowlevel.Message.guess_signature((dbus.UInt32(42),)) dbus.Signature('(u)')
Arrays work fine either way:
dbus.lowlevel.Message.guess_signature([42]) dbus.Signature('ai') dbus.lowlevel.Message.guess_signature(dbus.Array([42], signature='u')) dbus.Signature('au') dbus.lowlevel.Message.guess_signature([dbus.UInt32(42)]) dbus.Signature('au')