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
14 changes: 10 additions & 4 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Python package

on: [push, pull_request]
"on": [push, pull_request]

env:
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
Expand All @@ -12,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9, "3.10", "3.11", '3.12', '3.13']
python-version: [3.9, "3.10", "3.11", '3.12', '3.13', '3.14.0-rc.2']
# See https://github.com/actions/toolkit/issues/399
# include:
# - os: ubuntu-latest
Expand All @@ -38,8 +39,13 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -U pip "setuptools>=60" setuptools-gettext cython setuptools-rust
python -m pip install -U pip coverage codecov cython testscenarios typing-extensions
python -m pip install ".[dev,paramiko,doc,launchpad,git,fastimport]"
python -m pip install -U pip coverage codecov cython testscenarios dulwich typing-extensions
# paramiko (via pynacl) is broken on python 3.14
if [[ "${{ matrix.python-version }}" == "3.14"* ]]; then
python -m pip install ".[dev,doc,launchpad,git,fastimport]";
else
python -m pip install ".[dev,paramiko,doc,launchpad,git,fastimport]";
fi
- name: Install dependencies (linux/pip)
run: |
pip install pyinotify
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ jobs:
needs: define-matrix
strategy:
matrix:
os: [ubuntu-latest]
fail-fast: true
include: ${{ fromJSON(needs.define-matrix.outputs.matrix ) }}
fail-fast: ${{ !startsWith(github.ref, 'refs/tags/') }}

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -88,6 +88,7 @@ jobs:
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: "*cp314* *musllinux*"
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
CIBW_SKIP: '*-win32'
CIBW_SKIP_LINUX: '*-musllinux_*'
Expand Down
1 change: 0 additions & 1 deletion breezy/crash.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"""

# for interactive testing, try the 'brz assert-fail' command
# or see http://code.launchpad.net/~mbp/bzr/bzr-fail
#
# to test with apport it's useful to set
# export APPORT_IGNORE_OBSOLETE_PACKAGES=1
Expand Down
17 changes: 0 additions & 17 deletions breezy/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2617,23 +2617,6 @@ class BzrBadParameterContainsNewline(BzrBadParameter):
_fmt = "Parameter %(param)s contains a newline."


class ParamikoNotPresent(DependencyNotPresent):
"""Paramiko library is not available.

Raised when paramiko is required for SFTP support but is not installed or cannot be imported.
"""

_fmt = "Unable to import paramiko (required for sftp support): %(error)s"

def __init__(self, error):
"""Initialize with paramiko import error.

Args:
error: The import error that occurred when trying to import paramiko.
"""
DependencyNotPresent.__init__(self, "paramiko", error)


class UninitializableFormat(BzrError):
"""Format cannot be initialized by current Breezy version.

Expand Down
4 changes: 2 additions & 2 deletions breezy/export_pot.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ def _parse_source(source_text, filename="<unknown>"):
if isinstance(node, ast.ClassDef):
# TODO: worry about nesting?
cls_to_lineno[node.name] = node.lineno
elif isinstance(node, ast.Str):
elif isinstance(node, ast.Constant) and isinstance(node.value, str):
# Python AST gives location of string literal as the line the
# string terminates on. It's more useful to have the line the
# string begins on. Unfortunately, counting back newlines is
# only an approximation as the AST is ignorant of escaping.
str_to_lineno[node.s] = node.lineno
str_to_lineno[node.value] = node.lineno
return cls_to_lineno, str_to_lineno


Expand Down
3 changes: 3 additions & 0 deletions breezy/git/transportgit.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ def __init__(self, transport, filename, mode, bufsize, mask):

self._file = tempfile.SpooledTemporaryFile(max_size=1024 * 1024)
self._closed = False
for method in _GitFile.PROXY_METHODS:
if hasattr(self._file, method):
setattr(self, method, getattr(self._file, method))

def abort(self):
self._file.close()
Expand Down
56 changes: 17 additions & 39 deletions breezy/plugins/launchpad/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,30 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

"""Launchpad.net integration plugin for Bazaar.
"""Launchpad.net integration plugin.

This plugin provides facilities for working with Bazaar branches that are
hosted on Launchpad (http://launchpad.net). It provides a directory service
for referring to Launchpad branches using the "lp:" prefix. For example,
lp:bzr refers to the Bazaar's main development branch and
lp:~username/project/branch-name can be used to refer to a specific branch.
This plugin provides facilities for working with code hosted on Launchpad
(http://launchpad.net). It provides a directory service for referring to
Launchpad repositories using the "lp:" prefix. For example,
lp:~username/project/branch-name can be used to refer to a specific repository.

This plugin provides a bug tracker so that "bzr commit --fixes lp:1234" will
This plugin provides a bug tracker so that "brz commit --fixes lp:1234" will
record that revision as fixing Launchpad's bug 1234.

The plugin also provides the following commands:

launchpad-login: Show or set the Launchpad user ID
launchpad-open: Open a Launchpad branch page in your web browser
launchpad-open: Open a Launchpad page in your web browser

"""

# see http://wiki.bazaar.canonical.com/Specs/BranchRegistrationTool

from ... import (
ui,
version_info, # noqa: F401
)
from ... import 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 All @@ -65,12 +54,6 @@ def _register_directory():
"LaunchpadDirectory",
"Launchpad-based directory service",
)
directories.register_lazy(
"lp+bzr:",
"breezy.plugins.launchpad.lp_directory",
"LaunchpadDirectory",
"Bazaar-specific Launchpad directory service",
)


_register_directory()
Expand Down Expand Up @@ -104,33 +87,28 @@ def load_tests(loader, basic_tests, pattern):

_launchpad_help = """Integration with Launchpad.net

Launchpad.net provides free Bazaar branch hosting with integrated bug and
Launchpad.net provides code 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
The brz client (through the plugin called 'launchpad') has special
features to communicate with Launchpad:

* The launchpad-login command tells Bazaar your Launchpad user name. This
is then used by the 'lp:' transport to download your branches using
bzr+ssh://.
* The launchpad-login command tells Breezy your Launchpad user name.

* The 'lp:' transport uses Launchpad as a directory service: for example
'lp:bzr' and 'lp:python' refer to the main branches of the relevant
projects and may be branched, logged, etc. You can also use the 'lp:'
transport to refer to specific branches, e.g. lp:~bzr/bzr/trunk.
'lp:project' refers to the main branch of a project. You can also use
the 'lp:' transport to refer to specific repositories, e.g.
lp:~user/project/branch.

* The 'lp:' bug tracker alias can expand launchpad bug numbers to their
URLs for use with 'bzr commit --fixes', e.g. 'bzr commit --fixes lp:12345'
URLs for use with 'brz commit --fixes', e.g. 'brz commit --fixes lp:12345'
will record a revision property that marks that revision as fixing
Launchpad bug 12345. When you push that branch to Launchpad it will
Launchpad bug 12345. When you push to Launchpad it will
automatically be linked to the bug report.

For more information see http://help.launchpad.net/
"""
topic_registry.register("launchpad", _launchpad_help, "Using Bazaar with Launchpad.net")
topic_registry.register("launchpad", _launchpad_help, "Using Breezy with Launchpad.net")


from ...forge import forges
Expand Down
Loading