Skip to content

Commit 3fe8caa

Browse files
authored
build(binding/python): Support Python 3.13 (#5248)
1 parent 08d3bf4 commit 3fe8caa

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

bindings/python/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ futures = "0.3.28"
161161
opendal = { version = ">=0", path = "../../core", features = [
162162
"layers-blocking",
163163
] }
164-
pyo3 = { version = "0.21.2", features = ["abi3", "abi3-py311"] }
165-
pyo3-asyncio = { package = "pyo3-asyncio-0-21", version = "0.21", features = [
164+
pyo3 = { version = "0.22.5", features = ["abi3", "abi3-py311"] }
165+
pyo3-async-runtimes = { version = "0.22.0", features = [
166166
"tokio-runtime",
167167
] }
168168
tokio = "1"

bindings/python/pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ description = "Apache OpenDAL™ Python Binding"
2929
license = { text = "Apache-2.0" }
3030
name = "opendal"
3131
readme = "README.md"
32-
# PyO3 doesn't support python 3.13 yet.
33-
# ref: https://github.com/apache/opendal/issues/4268
34-
requires-python = ">=3.11, < 3.13"
32+
requires-python = ">=3.11"
3533

3634
[project.optional-dependencies]
3735
benchmark = [

bindings/python/src/file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use pyo3::buffer::PyBuffer;
3131
use pyo3::exceptions::PyIOError;
3232
use pyo3::exceptions::PyValueError;
3333
use pyo3::prelude::*;
34-
use pyo3_asyncio::tokio::future_into_py;
34+
use pyo3_async_runtimes::tokio::future_into_py;
3535
use tokio::sync::Mutex;
3636

3737
use crate::*;

bindings/python/src/lister.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use std::sync::Arc;
2020
use futures::TryStreamExt;
2121
use pyo3::exceptions::PyStopAsyncIteration;
2222
use pyo3::prelude::*;
23-
use pyo3_asyncio::tokio::future_into_py;
23+
use pyo3_async_runtimes::tokio::future_into_py;
2424
use tokio::sync::Mutex;
2525

2626
use crate::*;

bindings/python/src/operator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use std::time::Duration;
2222
use pyo3::prelude::*;
2323
use pyo3::types::PyBytes;
2424
use pyo3::types::PyDict;
25-
use pyo3_asyncio::tokio::future_into_py;
25+
use pyo3_async_runtimes::tokio::future_into_py;
2626

2727
use crate::*;
2828

@@ -32,7 +32,7 @@ fn build_operator(
3232
) -> PyResult<ocore::Operator> {
3333
let mut op = ocore::Operator::via_iter(scheme, map).map_err(format_pyerr)?;
3434
if !op.info().full_capability().blocking {
35-
let runtime = pyo3_asyncio::tokio::get_runtime();
35+
let runtime = pyo3_async_runtimes::tokio::get_runtime();
3636
let _guard = runtime.enter();
3737
op = op
3838
.layer(ocore::layers::BlockingLayer::create().expect("blocking layer must be created"));

0 commit comments

Comments
 (0)