Comment 21 for bug 714043

Revision history for this message
William Grant (wgrant) wrote : Re: [Bug 714043] Re: defaulting to staging is confusing

On 15/02/11 10:53, Leonard Richardson wrote:
> "Are you really changing that parameter from being a URL to being a
> symbolic name? That seems likely to break client applications."
>
> I didn't explain this very well. Let me try again.
>
> 1. The value of uris.LPNET_SERVICE_ROOT is 'https://api.launchpad.net/api/'. This has been the case since before 1.6.1. You can run this code and it will work, in maverick or natty.

I presume the trailing 'api/' is a thinko? I thought that was only
present on the webapp domains.

> [snip]
> "At the moment in Ubuntu's stable release, they must either hardcode a
> URL or do the moral equivalent through string manipulation, because
> there is no symbol for LPNET_SERVICE_ROOT"
>
> In Ubuntu's stable release, there is a symbol for LPNET_SERVICE_ROOT:
> it's uris.LPNET_SERVICE_ROOT. You can also use the string "production".
> If it turns out people would rather use uris.LPNET_SERVICE_ROOT than
> "production", I would like to change the value of
> uris.LPNET_SERVICE_ROOT to "production". Otherwise, people might get the
> idea that they can do URL manipulation on these constants, when they're
> actually supposed to be nothing but useful constants for people to pass
> into login_with().

LPNET_SERVICE_ROOT is not in launchpadlib.launchpad, where
EDGE_SERVICE_ROOT is (was) for compatibility reasons. I don't think many
people thought to look in launchpadlib.uris.

And people do perform URL manipulations on it. Mostly to emulate
web_url, I suspect.