Merge lp:~jelmer/brz/missing-launchpadlib into lp:brz/3.0

Proposed by Jelmer Vernooij on 2019-10-27
Status: Merged
Approved by: Jelmer Vernooij on 2019-11-17
Approved revision: 7327
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/missing-launchpadlib
Merge into: lp:brz/3.0
Diff against target: 107 lines (+41/-19)
5 files modified
breezy/plugins/launchpad/lp_api.py (+0/-17)
breezy/plugins/launchpad/lp_directory.py (+1/-1)
breezy/plugins/launchpad/lp_registration.py (+1/-1)
breezy/plugins/launchpad/uris.py (+36/-0)
doc/en/release-notes/brz-3.0.txt (+3/-0)
To merge this branch: bzr merge lp:~jelmer/brz/missing-launchpadlib
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve on 2019-11-17
Review via email: mp+374752@code.launchpad.net

Commit message

Allow running tests without launchpadlib installed.

Description of the change

Allow running tests without launchpadlib installed.

To post a comment you must log in.
Jelmer Vernooij (jelmer) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/plugins/launchpad/lp_api.py'
2--- breezy/plugins/launchpad/lp_api.py 2019-02-14 18:55:19 +0000
3+++ breezy/plugins/launchpad/lp_api.py 2019-10-27 04:29:46 +0000
4@@ -69,23 +69,6 @@
5 MINIMUM_LAUNCHPADLIB_VERSION = (1, 6, 3)
6
7
8-# We use production as the default because edge has been deprecated circa
9-# 2010-11 (see bug https://bugs.launchpad.net/bzr/+bug/583667)
10-DEFAULT_INSTANCE = 'production'
11-
12-LAUNCHPAD_DOMAINS = {
13- 'production': 'launchpad.net',
14- 'staging': 'staging.launchpad.net',
15- 'qastaging': 'qastaging.launchpad.net',
16- 'demo': 'demo.launchpad.net',
17- 'dev': 'launchpad.dev',
18- }
19-
20-LAUNCHPAD_BAZAAR_DOMAINS = [
21- 'bazaar.%s' % domain
22- for domain in LAUNCHPAD_DOMAINS.values()]
23-
24-
25 def get_cache_directory():
26 """Return the directory to cache launchpadlib objects in."""
27 return osutils.pathjoin(config.config_dir(), 'launchpad')
28
29=== modified file 'breezy/plugins/launchpad/lp_directory.py'
30--- breezy/plugins/launchpad/lp_directory.py 2019-02-09 02:59:15 +0000
31+++ breezy/plugins/launchpad/lp_directory.py 2019-10-27 04:29:46 +0000
32@@ -35,7 +35,7 @@
33 )
34 from ...i18n import gettext
35
36-from .lp_api import (
37+from .uris import (
38 DEFAULT_INSTANCE,
39 LAUNCHPAD_DOMAINS,
40 )
41
42=== modified file 'breezy/plugins/launchpad/lp_registration.py'
43--- breezy/plugins/launchpad/lp_registration.py 2019-01-18 01:19:29 +0000
44+++ breezy/plugins/launchpad/lp_registration.py 2019-10-27 04:29:46 +0000
45@@ -48,7 +48,7 @@
46 )
47 from ...transport.http import _urllib2_wrappers
48
49-from .lp_api import (
50+from .uris import (
51 DEFAULT_INSTANCE,
52 LAUNCHPAD_DOMAINS,
53 LAUNCHPAD_BAZAAR_DOMAINS,
54
55=== added file 'breezy/plugins/launchpad/uris.py'
56--- breezy/plugins/launchpad/uris.py 1970-01-01 00:00:00 +0000
57+++ breezy/plugins/launchpad/uris.py 2019-10-27 04:29:46 +0000
58@@ -0,0 +1,36 @@
59+# Copyright (C) 2009-2012 Canonical Ltd
60+#
61+# This program is free software; you can redistribute it and/or modify
62+# it under the terms of the GNU General Public License as published by
63+# the Free Software Foundation; either version 2 of the License, or
64+# (at your option) any later version.
65+#
66+# This program is distributed in the hope that it will be useful,
67+# but WITHOUT ANY WARRANTY; without even the implied warranty of
68+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
69+# GNU General Public License for more details.
70+#
71+# You should have received a copy of the GNU General Public License
72+# along with this program; if not, write to the Free Software
73+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
74+
75+"""Launchpad URIs."""
76+
77+from __future__ import absolute_import
78+
79+
80+# We use production as the default because edge has been deprecated circa
81+# 2010-11 (see bug https://bugs.launchpad.net/bzr/+bug/583667)
82+DEFAULT_INSTANCE = 'production'
83+
84+LAUNCHPAD_DOMAINS = {
85+ 'production': 'launchpad.net',
86+ 'staging': 'staging.launchpad.net',
87+ 'qastaging': 'qastaging.launchpad.net',
88+ 'demo': 'demo.launchpad.net',
89+ 'dev': 'launchpad.dev',
90+ }
91+
92+LAUNCHPAD_BAZAAR_DOMAINS = [
93+ 'bazaar.%s' % domain
94+ for domain in LAUNCHPAD_DOMAINS.values()]
95
96=== modified file 'doc/en/release-notes/brz-3.0.txt'
97--- doc/en/release-notes/brz-3.0.txt 2019-10-13 16:48:38 +0000
98+++ doc/en/release-notes/brz-3.0.txt 2019-10-27 04:29:46 +0000
99@@ -36,6 +36,9 @@
100 significantly slow down startup on some platforms.
101 (Jelmer Vernooń≥, #1832868)
102
103+ * Allow running tests without launchpadlib installed.
104+ (Jelmer Vernooń≥, #1849988)
105+
106 Documentation
107 *************
108

Subscribers

People subscribed via source and target branches