From 176b8f10d2d8794929dab844d0e4e2b5379fb7c7 Mon Sep 17 00:00:00 2001 From: Tesla <1394466835@qq.com> Date: Wed, 4 Dec 2024 12:50:59 +0800 Subject: [PATCH 1/4] feat: publish python3.13t free-threaded wheel --- .github/workflows/release_python.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/release_python.yml b/.github/workflows/release_python.yml index c00803e5d3cf..a37a841840d5 100644 --- a/.github/workflows/release_python.yml +++ b/.github/workflows/release_python.yml @@ -84,6 +84,16 @@ jobs: args: --release -o dist -i python3.10 --features=pyo3/extension-module,services-all sccache: true manylinux: auto + - name: Build free-threaded wheels + uses: PyO3/maturin-action@v1 + with: + maturin-version: "1.7.7" + working-directory: "bindings/python" + target: "${{ matrix.target }}" + command: build + args: --release -o dist -i python3.13t --features=pyo3/extension-module,services-all + sccache: true + manylinux: auto - name: Upload wheels uses: actions/upload-artifact@v3 with: From 9b1e665b0851d9c5a5ba3e5413084acff08dcf8f Mon Sep 17 00:00:00 2001 From: Tesla <1394466835@qq.com> Date: Wed, 4 Dec 2024 13:29:45 +0800 Subject: [PATCH 2/4] set gil_used false --- bindings/python/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/python/src/lib.rs b/bindings/python/src/lib.rs index f05b4b4de85b..578826add64d 100644 --- a/bindings/python/src/lib.rs +++ b/bindings/python/src/lib.rs @@ -70,7 +70,7 @@ pub use options::*; /// /// asyncio.run(main()) /// ``` -#[pymodule] +#[pymodule(gil_used = false)] fn _opendal(py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_class::()?; m.add_class::()?; From 0b95c39a78adc84fe64cb062d13c06963440409d Mon Sep 17 00:00:00 2001 From: Tesla <1394466835@qq.com> Date: Wed, 4 Dec 2024 14:27:08 +0800 Subject: [PATCH 3/4] update --- bindings/python/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 2625c1559089..60164df7b85e 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -163,7 +163,7 @@ futures = "0.3.28" opendal = { version = ">=0", path = "../../core", features = [ "layers-blocking", ] } -pyo3 = "0.23.2" +pyo3 = { version = "0.23.3", features = ["generate-import-lib"] } pyo3-async-runtimes = { version = "0.23.0", features = ["tokio-runtime"] } tokio = "1" From b40a192a8cc69c082e51292259aafe638fc783c2 Mon Sep 17 00:00:00 2001 From: messense Date: Wed, 4 Dec 2024 15:05:07 +0800 Subject: [PATCH 4/4] remove hardcoded `maturin-verison' --- .github/workflows/release_python.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release_python.yml b/.github/workflows/release_python.yml index a37a841840d5..2d98647fdfe2 100644 --- a/.github/workflows/release_python.yml +++ b/.github/workflows/release_python.yml @@ -87,7 +87,6 @@ jobs: - name: Build free-threaded wheels uses: PyO3/maturin-action@v1 with: - maturin-version: "1.7.7" working-directory: "bindings/python" target: "${{ matrix.target }}" command: build