diff --git a/.github/workflows/release_python.yml b/.github/workflows/release_python.yml index c00803e5d3c..2d98647fdfe 100644 --- a/.github/workflows/release_python.yml +++ b/.github/workflows/release_python.yml @@ -84,6 +84,15 @@ 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: + 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: diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 2625c155908..60164df7b85 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" diff --git a/bindings/python/src/lib.rs b/bindings/python/src/lib.rs index f05b4b4de85..578826add64 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::()?;