launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #09230
Re: Help please - launchpadlib collections
-
To:
Launchpad Community Development Team <launchpad-dev@xxxxxxxxxxxxxxxxxxx>
-
From:
Ian Booth <ian.booth@xxxxxxxxxxxxx>
-
Date:
Thu, 12 Apr 2012 15:31:40 +1000
-
In-reply-to:
<CAJ3HoZ3GicyQ=vSCi_kvWRKWJ1m9HgWeJQwNW9uEmv_6WPejSw@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120410 Thunderbird/11.0.1
>>>
>>> lp.projects['fooprojectgroup'] happens to work because launchpadlib's
>>> ProjectSet generates a URL of /fooprojectgroup, and that URL namespace
>>> is shared between projects, distributions and project groups. The
>>> returned interfaces are heterogeneous because of exactly the hack that
>>> Ian proposes as the easy solution -- indexing a client-defined
>>> collection like ProjectSet just generates a URL with a known structure
>>> and requests that resource, respecting whatever resource type is returned.
>>
>> Right, and thats why I'm saying the previously sketched thing of
>> respecting such information consistently will reduce the special
>> casing code, close of a couple of long standing bugs, be easier to
>> maintain and work with.
>>
>> So I rejected your MP and pointed you at the root cause. It still lets
>> you expose a collection of services but you don't need the special
>> casing. I don't think it is a distraction in any way.
>
> (thats bug #340935 - thanks wgrant)
>
Oh, so that's why I couldn't find the bug - I was looking in bugs for
the launchpadlib project. I had no idea the wadllib project even
existed. And why I kept saying to myself "what bug?".
Various conversations around fixing the problem without introducing
another client collection seemed to lead to having to modify
launchpadlib and the wadl generation amongst other things, and seemed
much more involved/complicated than the original proposal. Given that
advice and my lack of previous exposure to the vagaries of wadl
generation et al, it is a distraction since my main aim is to get the
disclosure work finished and this stuff is at this stage more of a nice
to have from that perspective.
Follow ups
References