add version requirements to Event classes
|Reported by:||robinson||Owned by:||atagar|
This first submission is a Request For Comments, I still need to write tests before I ask to add this branch.
While reviewing SignalEvent, I realized it would not work for the tor version I am running.
ProtocolError: SETEVENTS received unexpected response Unrecognized event "SIGNAL"
I thought the error message could be more meaningful (e.g.
ProtocolError: SETEVENTS received unexpected response SIGNAL event requires Tor version 0.2.3.1-alpha or later
So, this patch series adds a version check to Controller.add_event_listener() and provides versions to Event classes (with a default version in Event itself).
Is this something we should add to Stem? Is this the format to use? I'd appreciate any feedback.
Pull the exp-event-versions-v1 branch from git://gitorious.org/stem-robinson/stem-robinson.git or view commit logs @ https://gitorious.org/stem-robinson/stem-robinson/commits/exp-event-versions-v1