From e0165f2201034fde6c30df1722fc0da353e575bf Mon Sep 17 00:00:00 2001 From: "Ilya (Marshal)" Date: Fri, 20 Jun 2025 20:49:16 +0200 Subject: [PATCH 1/2] Update PyO3 to 0.25.1; add Python 3.14 support; add PyPy 3.11 support --- .github/workflows/release.yml | 23 ++++++++++++----------- Cargo.toml | 6 +++--- profiling/Cargo.toml | 2 +- profiling/src/profiles/encode_dag_cbor.rs | 2 +- pyproject.toml | 2 +- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 682870c..9e1d64d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - update-pyo3 tags: - 'v*.*.*' workflow_dispatch: @@ -25,39 +26,39 @@ jobs: - os: windows target: x86_64 - interpreter: pypy3.9 pypy3.10 + interpreter: pypy3.9 pypy3.10 pypy3.11 - os: windows target: i686 python-architecture: x86 - interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 + interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 3.14 - os: windows target: aarch64 - interpreter: 3.11 3.12 3.13 + interpreter: 3.11 3.12 3.13 3.14 - os: macos target: x86_64 - interpreter: pypy3.9 pypy3.10 + interpreter: pypy3.9 pypy3.10 pypy3.11 - os: macos target: aarch64 # actions/setup-python@v5 does not support 3.8 and 3.9 on arm64 - interpreter: 3.8 3.9 pypy3.9 pypy3.10 + interpreter: 3.8 3.9 pypy3.9 pypy3.10 pypy3.11 - os: ubuntu target: x86_64 - interpreter: pypy3.9 pypy3.10 + interpreter: pypy3.9 pypy3.10 pypy3.11 - os: ubuntu target: i686 - os: ubuntu target: aarch64 - os: ubuntu target: armv7 - interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 + interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 3.14 - os: ubuntu target: ppc64le - interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 + interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 3.14 - os: ubuntu target: s390x - interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 + interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 3.14 - os: ubuntu target: x86_64 @@ -90,7 +91,7 @@ jobs: target: ${{ matrix.target }} manylinux: ${{ matrix.manylinux || 'auto' }} container: ${{ matrix.container }} - args: --release --out dist --interpreter ${{ matrix.maturin-interpreter || matrix.interpreter || '3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10' }} ${{ matrix.extra-build-args }} + args: --release --out dist --interpreter ${{ matrix.maturin-interpreter || matrix.interpreter || '3.8 3.9 3.10 3.11 3.12 3.13 3.14 pypy3.9 pypy3.10 pypy3.11' }} ${{ matrix.extra-build-args }} rust-toolchain: 1.76.0 docker-options: -e CI @@ -109,7 +110,7 @@ jobs: fail-fast: false matrix: os: [ ubuntu-latest, windows-latest, macos-13, macos-14 ] - interpreter: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ] + interpreter: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14' ] exclude: # actions/setup-python@v5 does not support 3.8 and 3.9 on arm64 - os: macos-14 diff --git a/Cargo.toml b/Cargo.toml index b356c6a..79cf1b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" description = "Python binding to the Rust IPLD library" authors = ["Ilya (Marshal) "] -keywords = ["python", "binding", "library", "lib", "ipld", "cid", "multibase", "multihash", "dag", "cbor", "json", "pb", "dag-cbor", "dag-json"] +keywords = ["ipld", "cid", "multibase", "multihash", "dag-cbor"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] @@ -13,8 +13,8 @@ name = "libipld" crate-type = ["rlib", "cdylib"] [dependencies] -pyo3 = { version = "0.23.4", features = ["generate-import-lib", "anyhow"] } -python3-dll-a = "0.2.13" +pyo3 = { version = "0.25.1", features = ["generate-import-lib", "anyhow"] } +python3-dll-a = "0.2.14" anyhow = "1.0.95" libipld = { version = "0.16.0", features = ["dag-cbor"] } multibase = "0.9.1" diff --git a/profiling/Cargo.toml b/profiling/Cargo.toml index 884e4f7..b546e0d 100644 --- a/profiling/Cargo.toml +++ b/profiling/Cargo.toml @@ -11,4 +11,4 @@ structopt = "0.3.26" clap = "4.5.29" [dependencies.pyo3] -version = "0.23.4" +version = "0.25.1" diff --git a/profiling/src/profiles/encode_dag_cbor.rs b/profiling/src/profiles/encode_dag_cbor.rs index 1fe222a..91c9b75 100644 --- a/profiling/src/profiles/encode_dag_cbor.rs +++ b/profiling/src/profiles/encode_dag_cbor.rs @@ -14,7 +14,7 @@ pub fn exec(iterations: u64) { for _ in 0..iterations { Python::with_gil(|gil| { - println!("{}", libipld::encode_dag_cbor(gil, &PyString::new_bound(gil, json_str)).is_ok()); + println!("{}", libipld::encode_dag_cbor(gil, &PyString::new(gil, json_str)).is_ok()); }); } } diff --git a/pyproject.toml b/pyproject.toml index 25b3ece..30396c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ authors = [ license = "MIT" repository = "https://github.com/MarshalX/python-libipld" readme = "README.md" -keywords = ["library", "lib", "ipld", "cid", "multibase", "multihash", "dag", "cbor", "json", "pb", "dag-cbor", "dag-json"] +keywords = ["library", "lib", "ipld", "cid", "multibase", "multihash", "dag", "cbor", "dag-cbor"] requires-python = ">=3.8" classifiers = [ "Development Status :: 5 - Production/Stable", From 621a096d8dd48226efe03d3206924810e0da042e Mon Sep 17 00:00:00 2001 From: "Ilya (Marshal)" Date: Fri, 20 Jun 2025 21:01:10 +0200 Subject: [PATCH 2/2] remove Python 3.14 --- .github/workflows/release.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e1d64d..783b301 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - update-pyo3 tags: - 'v*.*.*' workflow_dispatch: @@ -30,10 +29,10 @@ jobs: - os: windows target: i686 python-architecture: x86 - interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 3.14 + interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 - os: windows target: aarch64 - interpreter: 3.11 3.12 3.13 3.14 + interpreter: 3.11 3.12 3.13 - os: macos target: x86_64 @@ -52,13 +51,13 @@ jobs: target: aarch64 - os: ubuntu target: armv7 - interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 3.14 + interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 - os: ubuntu target: ppc64le - interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 3.14 + interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 - os: ubuntu target: s390x - interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 3.14 + interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 - os: ubuntu target: x86_64 @@ -91,7 +90,7 @@ jobs: target: ${{ matrix.target }} manylinux: ${{ matrix.manylinux || 'auto' }} container: ${{ matrix.container }} - args: --release --out dist --interpreter ${{ matrix.maturin-interpreter || matrix.interpreter || '3.8 3.9 3.10 3.11 3.12 3.13 3.14 pypy3.9 pypy3.10 pypy3.11' }} ${{ matrix.extra-build-args }} + args: --release --out dist --interpreter ${{ matrix.maturin-interpreter || matrix.interpreter || '3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10 pypy3.11' }} ${{ matrix.extra-build-args }} rust-toolchain: 1.76.0 docker-options: -e CI @@ -110,7 +109,7 @@ jobs: fail-fast: false matrix: os: [ ubuntu-latest, windows-latest, macos-13, macos-14 ] - interpreter: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14' ] + interpreter: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ] exclude: # actions/setup-python@v5 does not support 3.8 and 3.9 on arm64 - os: macos-14