Bug 10514

Summary: telepathy-python: on service side, consider having SetAvatar default to byte_arrays=True
Product: Telepathy Reporter: Simon McVittie <smcv>
Component: tp-pythonAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED MOVED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: ali.sabil
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Simon McVittie 2007-04-03 04:27:39 UTC
12:15 < smcv> asabil, Zdra: if you want to know more about ByteArray vs Array 
              in Python, consult 
http://dbus.freedesktop.org/doc/dbus-python/doc/tutorial.html#return-values-and-the-byte-arrays-and-utf8-strings-options
12:16 < asabil> smcv, it seems that a small change would be very welcome in 
                tp-python
12:16 < smcv> Array of Byte is consistent with the rest of the API, so it's the 
              default - ByteArray is usually more useful though
12:16 < smcv> asabil: what change?
12:16 < asabil> adding the byte_array=True to the decorator
12:16 < smcv> eek aagh urgh
12:16 < smcv> there's a reason it's not the default
12:17 < asabil> which is?
12:17 < smcv> it's completely inconsistent with any other D-Bus array type
12:17 < asabil> yes and ?
12:17 < asabil> adding it to SetAvatar only would be quite useful
12:17 < smcv> the default ought to be consistent - least astonishment and all 
              that
12:17 < smcv> is this on the client side, or on the server side?
12:18 < asabil> server side
12:18 < smcv> hmm...
12:18 < asabil> because under python we always handle binary blobs as strings
12:18 < smcv> yeah, that's why ByteArray exists
12:19 < asabil> so when you Set an Avatar I expect it to be a binary blob
12:19 < asabil> ie. a string
12:19 < smcv> hmm
12:19 < smcv> least astonishment vs the default being the right thing...
12:20 < smcv> perhaps you're right, the default should be Array of Byte but in 
              telepathy-python we know that ByteArray is more useful
12:20 < smcv> s/the default/the dbus-python default/
12:20 < asabil> I would say that as well
Comment 1 Simon McVittie 2009-04-14 06:36:37 UTC
I don't really maintain tppy any more; assigning to the mailing list.
Comment 2 GitLab Migration User 2019-12-03 19:35:43 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/telepathy/telepathy-python/issues/1.

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.