Merge lp:~maxb/bzr/2.2-launchpadlib-service-root-api-compat into lp:bzr/2.2

Proposed by Max Bowsher
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: no longer in the source branch.
Merged at revision: 5122
Proposed branch: lp:~maxb/bzr/2.2-launchpadlib-service-root-api-compat
Merge into: lp:bzr/2.2
Diff against target: 46 lines (+23/-2)
2 files modified
NEWS (+6/-0)
bzrlib/plugins/launchpad/lp_api.py (+17/-2)
To merge this branch: bzr merge lp:~maxb/bzr/2.2-launchpadlib-service-root-api-compat
Reviewer Review Type Date Requested Status
Vincent Ladeuil Approve
Review via email: mp+48282@code.launchpad.net

Commit message

Merge 2.1 into 2.2 for lp:707075, and add NEWS entry.

To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) wrote :

Please clarify the NEWS entry from:

<maxb> The bug always existed in the url config within bzr for talking to lp production - but not edge. Therefore, it only became a problem when we switched to talking to production

review: Approve
Revision history for this message
Vincent Ladeuil (vila) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2011-01-20 21:40:17 +0000
3+++ NEWS 2011-02-02 10:53:44 +0000
4@@ -19,6 +19,12 @@
5 Bug Fixes
6 *********
7
8+* Fix communications with the Launchpad web service when using
9+ launchpadlib >= 1.5.5. This was a latent bug in bzr's communication
10+ with Launchpad's production instance, which only became a problem when
11+ the default instance was switched from edge to production in bzr 2.2.3.
12+ (Max Bowsher, #707075)
13+
14 Improvements
15 ************
16
17
18=== modified file 'bzrlib/plugins/launchpad/lp_api.py'
19--- bzrlib/plugins/launchpad/lp_api.py 2010-11-26 18:13:30 +0000
20+++ bzrlib/plugins/launchpad/lp_api.py 2011-02-02 10:53:44 +0000
21@@ -73,10 +73,25 @@
22 installed_version, installed_version)
23
24
25+# The older versions of launchpadlib only provided service root constants for
26+# edge and staging, whilst newer versions drop edge. Therefore service root
27+# URIs for which we do not always have constants are derived from the staging
28+# one, which does always exist.
29+#
30+# It is necessary to derive, rather than use hardcoded URIs because
31+# launchpadlib <= 1.5.4 requires service root URIs that end in a path of
32+# /beta/, whilst launchpadlib >= 1.5.5 requires service root URIs with no path
33+# info.
34+#
35+# Once we have a hard dependency on launchpadlib >= 1.5.4 we can replace all of
36+# bzr's local knowledge of individual Launchpad instances with use of the
37+# launchpadlib.uris module.
38 LAUNCHPAD_API_URLS = {
39- 'production': 'https://api.launchpad.net/beta/',
40+ 'production': STAGING_SERVICE_ROOT.replace('api.staging.launchpad.net',
41+ 'api.launchpad.net'),
42 'staging': STAGING_SERVICE_ROOT,
43- 'dev': 'https://api.launchpad.dev/beta/',
44+ 'dev': STAGING_SERVICE_ROOT.replace('api.staging.launchpad.net',
45+ 'api.launchpad.dev'),
46 }
47
48

Subscribers

People subscribed via source and target branches