Bug 69967 - does not use dbus.Struct.signature to guess signature of a Struct
Summary: does not use dbus.Struct.signature to guess signature of a Struct
Status: RESOLVED MOVED
Alias: None
Product: dbus
Classification: Unclassified
Component: python (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Simon McVittie
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-30 14:32 UTC by Simon McVittie
Modified: 2018-08-22 22:03 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Simon McVittie 2013-09-30 14:32:50 UTC
>>> 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')
Comment 1 GitLab Migration User 2018-08-22 22:03:18 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/dbus/dbus-python/issues/3.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.