The payload is sometimes mentioned as string and sometimes as array of bytes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zeitgeist Framework |
Won't Fix
|
Wishlist
|
J.P. Lacerda |
Bug Description
In the event serialization format, the third array is array of bytes or ay as dbus signature.
When an event enters an extension, it looks like
Event([
which implies that payload is array of bytes
Now look at _zeitgeist/
where you get the line
>> popo.append(
Really so when you do str() on dbus.Array([], signature=
you get "dbus.Array([], signature=
Now when you call Event.get_plain on
Event([
you get
[[u'', u'1292500628312', u'', u'', u'application:
Not what you expect
Related branches
- Siegfried Gevatter: Needs Fixing
-
Diff: 98 lines (+17/-12)1 file modified_zeitgeist/engine/remote.py (+17/-12)
description: | updated |
Changed in zeitgeist: | |
milestone: | none → 0.7.0 |
Changed in zeitgeist: | |
status: | Confirmed → In Progress |
Changed in zeitgeist: | |
importance: | Undecided → High |
Changed in zeitgeist: | |
importance: | High → Medium |
importance: | Medium → Wishlist |
Changed in zeitgeist: | |
milestone: | 0.7.0 → none |
Changed in zeitgeist: | |
milestone: | none → 0.8.0 |
Changed in zeitgeist: | |
assignee: | Manish Sinha (मनीष सिन्हा) (manishsinha) → nobody |
Changed in zeitgeist: | |
assignee: | nobody → Seif Lotfy (seif) |
Changed in zeitgeist: | |
assignee: | Seif Lotfy (seif) → J.P. Lacerda (jplacerda) |
Manish, is this (esp. the last few lines `"dbus.Array([], signature= dbus.Signature( 'y'))"` ) something you get somewhere with real code (if so, please attach a minimal reproducer) or is it *just* loud thinking?
payload is in fact an array of bytes, as defined in the dbus signature. You should not care about the weirdness done in zeitgeist, it should just do the right thing. It does the right thing because a String in python is in first approximation just an array of bytes (I know this statement is not 100% true for all python versions, but it is good enough for our needs)
There are only two possible reasons where this assumtion would fail:
* we want to support python 2.x and 3.x at the same time, which is a no-go
* I'm missing something ;) - please prove me wrong with some code.