You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by ma...@apache.org on 2024/10/28 12:11:37 UTC
(opendal) 01/01: build(binding/python): Support Python 3.13
This is an automated email from the ASF dual-hosted git repository.
manjusaka pushed a commit to branch manjusaka/support-python313
in repository https://gitbox.apache.org/repos/asf/opendal.git
commit dae8dd39a26821979135cd20ff7121c5a11713f3
Author: Manjusaka <me...@manjusaka.me>
AuthorDate: Mon Oct 28 20:11:24 2024 +0800
build(binding/python): Support Python 3.13
Signed-off-by: Manjusaka <me...@manjusaka.me>
---
bindings/python/Cargo.toml | 4 ++--
bindings/python/pyproject.toml | 2 +-
bindings/python/src/file.rs | 2 +-
bindings/python/src/lister.rs | 2 +-
bindings/python/src/operator.rs | 4 ++--
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml
index 28f5725767..0ecb72511e 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 cb64f80e69..bf7a1d9522 100644
--- a/bindings/python/pyproject.toml
+++ b/bindings/python/pyproject.toml
@@ -31,7 +31,7 @@ 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 53a65a274f..be7a461893 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 e108ec2dcc..e2074016fa 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 54e7345741..0e6c51ce10 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<ocore::Operator> {
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"));