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
20 changes: 16 additions & 4 deletions .github/workflows/wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
python-version: '3.11'
cache: pip
- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq
- name: Install cibuildwheel
run: pip install cibuildwheel
run: pip install 'cibuildwheel>=3.0'
- name: Find build identifiers using cibuildwheel --print-build-identifiers
id: all-build-identifiers
run: |
Expand Down Expand Up @@ -65,6 +65,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install native dependencies (Ubuntu)
run: sudo apt-get update && sudo apt-get install -y libgpgme-dev libgpg-error-dev
if: "matrix.os == 'ubuntu-latest'"
- name: set up rust
if: matrix.os != 'ubuntu'
uses: actions-rs/toolchain@v1
Expand All @@ -78,7 +83,14 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel cibuildwheel
pip install setuptools wheel 'cibuildwheel>=3.0'
- name: Provide gpgme-config and gpg-error-config
if: "matrix.os == 'ubuntu-latest'"
run: |
mkdir -p "$HOME/.local/bin"
cp .github/gpgme-config "$HOME/.local/bin/gpgme-config"
cp .github/gpg-error-config "$HOME/.local/bin/gpg-error-config"
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install gpg on supported platforms
run: pip install -U gpg
if: "matrix.os == 'macos-latest'"
Expand All @@ -88,7 +100,7 @@ jobs:
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: "*cp314* *musllinux* *-win32"
CIBW_SKIP: "*musllinux* *-win32"
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
CIBW_SKIP_LINUX: '*-musllinux_*'
CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH" PYO3_USE_ABI3_FORWARD_COMPATIBILITY="1"'
Expand Down
25 changes: 12 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ nix = { workspace = true, features = ["fs"] }

[workspace.dependencies]
nix = ">=0.26"
pyo3 = "=0.25"
pyo3 = "=0.26"
pyo3-filelike = "0.5.0"
chrono = { version = "0.4", default-features = false, features = ["std", "clock"] }
url = "2"
Expand Down
20 changes: 13 additions & 7 deletions breezy/git/object_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,13 +899,19 @@ def __getitem__(self, sha):
raise KeyError(sha)

def generate_lossy_pack_data(
self, have, want, shallow=None, progress=None, get_tagged=None, ofs_delta=False
self,
haves,
wants,
shallow=None,
progress=None,
get_tagged=None,
ofs_delta=False,
):
"""Generate pack data with potential data loss.

Args:
have: Object IDs already available.
want: Object IDs that are wanted.
haves: Object IDs already available.
wants: Object IDs that are wanted.
shallow: Optional shallow commit list.
progress: Optional progress callback.
get_tagged: Optional function to get tagged objects.
Expand All @@ -918,8 +924,8 @@ def generate_lossy_pack_data(
# because self[oid] would reconstruct them with the wrong lossy setting
objects = []
processed = set()
ret: dict[ObjectID, list] = self.lookup_git_shas(list(have) + list(want))
for commit_sha in have:
ret: dict[ObjectID, list] = self.lookup_git_shas(list(haves) + list(wants))
for commit_sha in haves:
commit_sha = self.unpeel_map.peel_tag(commit_sha, commit_sha)
try:
for type, type_data in ret[commit_sha]:
Expand All @@ -929,8 +935,8 @@ def generate_lossy_pack_data(
except KeyError:
trace.mutter("unable to find remote ref %s", commit_sha)
pending = set()
for commit_sha in want:
if commit_sha in have:
for commit_sha in wants:
if commit_sha in haves:
continue
try:
for type, type_data in ret[commit_sha]:
Expand Down
18 changes: 9 additions & 9 deletions breezy/plugins/fastimport/cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,15 +351,15 @@ def run(
if mode is None:
mode = "default"
params = {
"info": info,
"trees": trees,
"count": count,
"checkpoint": checkpoint,
"autopack": autopack,
"inv-cache": inv_cache,
"mode": mode,
"import-marks": import_marks,
"export-marks": export_marks,
b"info": info,
b"trees": trees,
b"count": count,
b"checkpoint": checkpoint,
b"autopack": autopack,
b"inv-cache": inv_cache,
b"mode": mode,
b"import-marks": import_marks,
b"export-marks": export_marks,
}
return _run(
source,
Expand Down
18 changes: 9 additions & 9 deletions breezy/plugins/fastimport/processors/generic_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ class GenericProcessor(processor.ImportProcessor):
"""

known_params = [
"info",
"trees",
"count",
"checkpoint",
"autopack",
"inv-cache",
"mode",
"import-marks",
"export-marks",
b"info",
b"trees",
b"count",
b"checkpoint",
b"autopack",
b"inv-cache",
b"mode",
b"import-marks",
b"export-marks",
]

def __init__(
Expand Down
18 changes: 10 additions & 8 deletions doc/en/release-notes/brz-3.3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ Breezy Release Notes
.. toctree::
:maxdepth: 1

brz 3.4.0
brz 3.3.15
##########

:Codename: TBD
:3.4.0: Not yet released
:3.3.15: 2025-10-26

* The ``breezy.pyutils`` module has been removed. Use ``catalogus.pyutils``
instead. (Jelmer Vernooij)
* Add Python 3.14 support. (Jelmer Vernooij, #2121688)

* The ``Registry`` class has been removed from ``breezy.registry``. Use
``catalogus.registry.Registry`` instead. The ``FormatRegistry`` class
remains in ``breezy.registry``. (Jelmer Vernooij)
* Migrate Rust code to modern PyO3 0.26 API to eliminate deprecation warnings.
(Jelmer Vernooij)

brz 3.3.14
##########

There was no 3.3.14 release.

brz 3.3.13
##########
Expand Down
6 changes: 4 additions & 2 deletions doc/en/upgrade-guide/data_migration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ first:
A complete backup gives you a safety net in case anything goes wrong.

Purging obsolete branches reduces the amount of data that needs to
be migrated. See `Finding obsolete branches`_ later for some tips
be migrated. See `finding-obsolete-branches`_ later for some tips
on doing this.


Expand Down Expand Up @@ -190,7 +190,7 @@ To migrate branches in a shared repository:
new directory inside the shared repository.

3. Decide which of your local branches you want to migrate. (If you
haven't already, now's a good time for `Finding obsolete branches`_
haven't already, now's a good time for `finding-obsolete-branches`_
and purging them, after backing up first of course.)

4. To migrate each local branch of interest, there are 2 options:
Expand All @@ -217,6 +217,8 @@ However, it isn't ideal if you're not ready to include all the latest
revisions from trunk into that branch yet.


.. _finding-obsolete-branches:

Finding obsolete branches
-------------------------

Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,9 @@ convention = "google"
build_dir = "breezy/locale"

[tool.cibuildwheel.linux]
skip = "*-musllinux_* *cp314*"
skip = "*-musllinux_*"
archs = ["auto", "aarch64"]

[tool.cibuildwheel.macos]
skip = "*cp314*"

[tool.cibuildwheel.windows]
skip = "*cp314*"
31 changes: 15 additions & 16 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,29 +92,28 @@ fn posix_setup(py: Python<'_>) -> PyResult<()> {
fn main() {
pyo3::prepare_freethreaded_python();

fn main(py: Python) -> PyResult<Bound<PyAny>> {
posix_setup(py)?;
Python::with_gil(|py| {
let result = (|| -> PyResult<Bound<PyAny>> {
posix_setup(py)?;

update_path(py)?;
update_path(py)?;

check_version(py)?;
check_version(py)?;

let args: Vec<String> = std::env::args().collect();
let args: Vec<String> = std::env::args().collect();

if args.contains(&String::from("--profile-imports")) {
let profile_imports = PyModule::import(py, "profile_imports")?;
profile_imports.getattr("install")?.call1(())?;
}
if args.contains(&String::from("--profile-imports")) {
let profile_imports = PyModule::import(py, "profile_imports")?;
profile_imports.getattr("install")?.call0()?;
}

let sys = PyModule::import(py, "sys")?;
sys.setattr("argv", PyList::new(py, args)?)?;
let sys = PyModule::import(py, "sys")?;
sys.setattr("argv", PyList::new(py, args)?)?;

let main = PyModule::import(py, "breezy.__main__")?;
main.getattr("main")?.call1(())
}
let main = PyModule::import(py, "breezy.__main__")?;
main.getattr("main")?.call0()
})();

Python::with_gil(|py| {
let result = main(py);
std::process::exit(match result {
Ok(_) => 0,
Err(e) if e.is_instance_of::<PySystemExit>(py) => {
Expand Down
Loading