/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/plugins/launchpad/lp_api.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
    STAGING_SERVICE_ROOT,
48
48
    Launchpad,
49
49
    )
50
 
try:
51
 
    from launchpadlib.uris import LPNET_SERVICE_ROOT
52
 
except ImportError:
53
 
    LPNET_SERVICE_ROOT = 'https://api.launchpad.net/beta/'
54
50
 
55
51
 
56
52
# Declare the minimum version of launchpadlib that we need in order to work.
78
74
            installed_version, installed_version)
79
75
 
80
76
 
 
77
# The older versions of launchpadlib only provided service root constants for
 
78
# edge and staging, whilst newer versions drop edge. Therefore service root
 
79
# URIs for which we do not always have constants are derived from the staging
 
80
# one, which does always exist.
 
81
#
 
82
# It is necessary to derive, rather than use hardcoded URIs because
 
83
# launchpadlib <= 1.5.4 requires service root URIs that end in a path of
 
84
# /beta/, whilst launchpadlib >= 1.5.5 requires service root URIs with no path
 
85
# info.
 
86
#
 
87
# Once we have a hard dependency on launchpadlib >= 1.5.4 we can replace all of
 
88
# bzr's local knowledge of individual Launchpad instances with use of the
 
89
# launchpadlib.uris module.
81
90
LAUNCHPAD_API_URLS = {
82
 
    'production': LPNET_SERVICE_ROOT,
 
91
    'production': STAGING_SERVICE_ROOT.replace('api.staging.launchpad.net',
 
92
        'api.launchpad.net'),
83
93
    'staging': STAGING_SERVICE_ROOT,
84
 
    'dev': 'https://api.launchpad.dev/beta/',
 
94
    'dev': STAGING_SERVICE_ROOT.replace('api.staging.launchpad.net',
 
95
        'api.launchpad.dev'),
85
96
    }
86
97
 
87
98