Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ jobs:
if: "matrix.os == 'windows-latest'"
- name: Run mypy
run: |
python -m pip install mypy types-PyYAML types-paramiko types-setuptools
python -m pip install mypy types-PyYAML types-paramiko types-setuptools typing-extensions
python -m mypy breezy
if: "matrix.python-version != 'pypy3'"
11 changes: 11 additions & 0 deletions breezy/plugins/launchpad/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,20 @@
# see http://wiki.bazaar.canonical.com/Specs/BranchRegistrationTool

from ... import (
ui,
version_info, # noqa: F401
)
from ...commands import plugin_cmds
from ...directory_service import directories
from ...help_topics import topic_registry

# Register the Bazaar deprecation warning template
ui.UIFactory._user_warning_templates["launchpad_bazaar_deprecation"] = (
"Launchpad is phasing out Bazaar code hosting. "
"For more information, see: "
"https://blog.launchpad.net/general/phasing-out-bazaar-code-hosting"
)

for klsname, aliases in [
("cmd_launchpad_open", ["lp-open"]),
("cmd_launchpad_login", ["lp-login"]),
Expand Down Expand Up @@ -89,6 +97,9 @@ def load_tests(loader, basic_tests, pattern):
Launchpad.net provides free Bazaar branch hosting with integrated bug and
specification tracking.

NOTE: Launchpad is phasing out Bazaar code hosting. For more information, see:
https://blog.launchpad.net/general/phasing-out-bazaar-code-hosting

The bzr client (through the plugin called 'launchpad') has special
features to communicate with Launchpad:

Expand Down
3 changes: 3 additions & 0 deletions breezy/plugins/launchpad/forge.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,9 @@ def _publish_bzr(
allow_lossy=True,
tag_selector=None,
):
from ... import ui

ui.ui_factory.show_user_warning("launchpad_bazaar_deprecation")
to_path = self._get_derived_bzr_path(base_branch, name, owner, project)
to_transport = get_transport(BZR_SCHEME_MAP["ssh"] + to_path)
try:
Expand Down
3 changes: 2 additions & 1 deletion breezy/plugins/launchpad/lp_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from urllib.parse import urlsplit

from ... import debug, errors, trace, transport
from ... import debug, errors, trace, transport, ui
from ...urlutils import InvalidURL, join, split
from .account import get_lp_login
from .uris import LPNET_SERVICE_ROOT
Expand Down Expand Up @@ -92,6 +92,7 @@ def _resolve_via_api(path, url, api_base_url=LPNET_SERVICE_ROOT):
path, subpath = split(path)
subpaths.insert(0, subpath)
if lp_branch:
ui.ui_factory.show_user_warning("launchpad_bazaar_deprecation")
return {
"urls": [
join(lp_branch.composePublicURL(scheme="bzr+ssh"), *subpaths),
Expand Down
5 changes: 5 additions & 0 deletions doc/en/release-notes/brz-3.3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ brz 3.3.13

:3.3.13: UNRELEASED

* Add warning when accessing Bazaar branches on Launchpad, as Launchpad
is phasing out Bazaar code hosting. The warning can be suppressed by
adding ``launchpad_bazaar_deprecation`` to the ``suppress_warnings``
configuration option. (Jelmer Vernooij)

brz 3.3.12
##########

Expand Down
Loading