launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #04847
Re: timeline questions
On Wed, Sep 29, 2010 at 3:06 PM, Robert Collins
<robert.collins@xxxxxxxxxxxxx> wrote:
> On Wed, Sep 29, 2010 at 8:19 PM, Stuart Bishop
> <stuart.bishop@xxxxxxxxxxxxx> wrote:
>>>> And if get_current_browser_request always works, can we put it in
>>>> get_request_timeline instead of typing it explicitly every time?
>>>
>>> So there are two disconnected steps:
>>> - get a request from some context
>>> - get the timeline from that request (which will use IAnnotations
>>> once bug 623199 is fixed)
>>>
>>> I'm not too keen on conflating these steps; we could certainly add a
>>> new helper get_current_browser_request_timeline() though, that would
>>> be fine.
>>
>> For scripts, consider adding this as an attribute on LaunchpadScript
>> so everyone gets to play.
>
> hmm? scripts can use features already; fixing bug 623199 would make
> that be better structured, but theres no functional issue today.
I mean making LaunchpadScript.__init__() initialize self.timeline (or
LaunchpadScript.timeline into a property) so it is trivial for scripts
to use and easy to find, which makes it much more likely people will
use it. Also only one piece of code to change if the setup dance
changes.
--
Stuart Bishop <stuart@xxxxxxxxxxxxxxxx>
http://www.stuartbishop.net/
Follow ups
References