diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 28f5725767d9..0ecb72511eed 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -161,8 +161,8 @@ futures = "0.3.28" opendal = { version = ">=0", path = "../../core", features = [ "layers-blocking", ] } -pyo3 = { version = "0.21.2", features = ["abi3", "abi3-py311"] } -pyo3-asyncio = { package = "pyo3-asyncio-0-21", version = "0.21", features = [ +pyo3 = { version = "0.22.5", features = ["abi3", "abi3-py311"] } +pyo3-async-runtimes = { version = "0.22.0", features = [ "tokio-runtime", ] } tokio = "1" diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml index cb64f80e69d1..fd58e48ff34a 100644 --- a/bindings/python/pyproject.toml +++ b/bindings/python/pyproject.toml @@ -29,9 +29,7 @@ description = "Apache OpenDALâ„¢ Python Binding" license = { text = "Apache-2.0" } name = "opendal" readme = "README.md" -# PyO3 doesn't support python 3.13 yet. -# ref: https://github.com/apache/opendal/issues/4268 -requires-python = ">=3.11, < 3.13" +requires-python = ">=3.11" [project.optional-dependencies] benchmark = [ diff --git a/bindings/python/src/file.rs b/bindings/python/src/file.rs index 53a65a274f9e..be7a461893e3 100644 --- a/bindings/python/src/file.rs +++ b/bindings/python/src/file.rs @@ -31,7 +31,7 @@ use pyo3::buffer::PyBuffer; use pyo3::exceptions::PyIOError; use pyo3::exceptions::PyValueError; use pyo3::prelude::*; -use pyo3_asyncio::tokio::future_into_py; +use pyo3_async_runtimes::tokio::future_into_py; use tokio::sync::Mutex; use crate::*; diff --git a/bindings/python/src/lister.rs b/bindings/python/src/lister.rs index e108ec2dcc36..e2074016fae3 100644 --- a/bindings/python/src/lister.rs +++ b/bindings/python/src/lister.rs @@ -20,7 +20,7 @@ use std::sync::Arc; use futures::TryStreamExt; use pyo3::exceptions::PyStopAsyncIteration; use pyo3::prelude::*; -use pyo3_asyncio::tokio::future_into_py; +use pyo3_async_runtimes::tokio::future_into_py; use tokio::sync::Mutex; use crate::*; diff --git a/bindings/python/src/operator.rs b/bindings/python/src/operator.rs index 54e7345741fe..0e6c51ce1071 100644 --- a/bindings/python/src/operator.rs +++ b/bindings/python/src/operator.rs @@ -22,7 +22,7 @@ use std::time::Duration; use pyo3::prelude::*; use pyo3::types::PyBytes; use pyo3::types::PyDict; -use pyo3_asyncio::tokio::future_into_py; +use pyo3_async_runtimes::tokio::future_into_py; use crate::*; @@ -32,7 +32,7 @@ fn build_operator( ) -> PyResult { let mut op = ocore::Operator::via_iter(scheme, map).map_err(format_pyerr)?; if !op.info().full_capability().blocking { - let runtime = pyo3_asyncio::tokio::get_runtime(); + let runtime = pyo3_async_runtimes::tokio::get_runtime(); let _guard = runtime.enter(); op = op .layer(ocore::layers::BlockingLayer::create().expect("blocking layer must be created"));