From 80887a09f3f5690bbaadf47c6f0fa0b68d3a7a55 Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Sun, 9 Mar 2025 23:55:04 -0400 Subject: [PATCH 1/4] Bump to pyo3 0.24 --- .vscode/settings.json | 3 +++ Cargo.toml | 8 ++++---- README.md | 24 ++++++++++++------------ pyo3-async-runtimes-macros/Cargo.toml | 2 +- src/async_std.rs | 2 +- src/generic.rs | 2 +- src/lib.rs | 15 ++++++--------- src/testing.rs | 2 +- src/tokio.rs | 2 +- 9 files changed, 30 insertions(+), 30 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6f5c4ed --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "rust-analyzer.cargo.features": "all" +} diff --git a/Cargo.toml b/Cargo.toml index c5bb6b8..e40aaa8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pyo3-async-runtimes" description = "PyO3 bridges from Rust runtimes to Python's Asyncio library" -version = "0.23.0" +version = "0.24.0" authors = [ "Andrew J Westlake ", "David Hewitt ", @@ -120,11 +120,11 @@ futures = "0.3" inventory = { version = "0.3", optional = true } once_cell = "1.14" pin-project-lite = "0.2" -pyo3 = "0.23" -pyo3-async-runtimes-macros = { path = "pyo3-async-runtimes-macros", version = "=0.23.0", optional = true } +pyo3 = "0.24" +pyo3-async-runtimes-macros = { path = "pyo3-async-runtimes-macros", version = "=0.24.0", optional = true } [dev-dependencies] -pyo3 = { version = "0.23", features = ["macros"] } +pyo3 = { version = "0.24", features = ["macros"] } [dependencies.async-std] version = "1.12" diff --git a/README.md b/README.md index b98403a..3a2c7de 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,8 @@ Here we initialize the runtime, import Python's `asyncio` library and run the gi ```toml # Cargo.toml dependencies [dependencies] -pyo3 = { version = "0.23" } -pyo3-async-runtimes = { version = "0.23", features = ["attributes", "async-std-runtime"] } +pyo3 = { version = "0.24" } +pyo3-async-runtimes = { version = "0.24", features = ["attributes", "async-std-runtime"] } async-std = "1.13" ``` @@ -84,8 +84,8 @@ attribute. ```toml # Cargo.toml dependencies [dependencies] -pyo3 = { version = "0.23" } -pyo3-async-runtimes = { version = "0.23", features = ["attributes", "tokio-runtime"] } +pyo3 = { version = "0.24" } +pyo3-async-runtimes = { version = "0.24", features = ["attributes", "tokio-runtime"] } tokio = "1.40" ``` @@ -130,8 +130,8 @@ For `async-std`: ```toml [dependencies] -pyo3 = { version = "0.23", features = ["extension-module"] } -pyo3-async-runtimes = { version = "0.23", features = ["async-std-runtime"] } +pyo3 = { version = "0.24", features = ["extension-module"] } +pyo3-async-runtimes = { version = "0.24", features = ["async-std-runtime"] } async-std = "1.13" ``` @@ -139,8 +139,8 @@ For `tokio`: ```toml [dependencies] -pyo3 = { version = "0.20", features = ["extension-module"] } -pyo3-async-runtimes = { version = "0.23", features = ["tokio-runtime"] } +pyo3 = { version = "0.24", features = ["extension-module"] } +pyo3-async-runtimes = { version = "0.24", features = ["tokio-runtime"] } tokio = "1.40" ``` @@ -434,8 +434,8 @@ name = "my_async_module" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.23", features = ["extension-module"] } -pyo3-async-runtimes = { version = "0.23", features = ["tokio-runtime"] } +pyo3 = { version = "0.24", features = ["extension-module"] } +pyo3-async-runtimes = { version = "0.24", features = ["tokio-runtime"] } async-std = "1.13" tokio = "1.40" ``` @@ -494,8 +494,8 @@ event loop before we can install the `uvloop` policy. ```toml [dependencies] async-std = "1.13" -pyo3 = "0.23" -pyo3-async-runtimes = { version = "0.23", features = ["async-std-runtime"] } +pyo3 = "0.24" +pyo3-async-runtimes = { version = "0.24", features = ["async-std-runtime"] } ``` ```rust no_run diff --git a/pyo3-async-runtimes-macros/Cargo.toml b/pyo3-async-runtimes-macros/Cargo.toml index 91f1b15..120fa50 100644 --- a/pyo3-async-runtimes-macros/Cargo.toml +++ b/pyo3-async-runtimes-macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pyo3-async-runtimes-macros" description = "Proc Macro Attributes for `pyo3-async-runtimes`" -version = "0.23.0" +version = "0.24.0" authors = [ "Andrew J Westlake ", "David Hewitt ", diff --git a/src/async_std.rs b/src/async_std.rs index 34c9401..291067f 100644 --- a/src/async_std.rs +++ b/src/async_std.rs @@ -9,7 +9,7 @@ //! //! ```toml //! [dependencies.pyo3-async-runtimes] -//! version = "0.23" +//! version = "0.24" //! features = ["unstable-streams"] //! ``` diff --git a/src/generic.rs b/src/generic.rs index 3f96f08..32a0e21 100644 --- a/src/generic.rs +++ b/src/generic.rs @@ -9,7 +9,7 @@ //! //! ```toml //! [dependencies.pyo3-async-runtimes] -//! version = "0.23" +//! version = "0.24" //! features = ["unstable-streams"] //! ``` diff --git a/src/lib.rs b/src/lib.rs index 480e8a4..dc1ceb0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -300,7 +300,7 @@ //! //! ```toml //! [dependencies.pyo3-async-runtimes] -//! version = "0.23" +//! version = "0.24" //! features = ["attributes"] //! ``` //! @@ -313,7 +313,7 @@ //! //! ```toml //! [dependencies.pyo3-async-runtimes] -//! version = "0.23" +//! version = "0.24" //! features = ["async-std-runtime"] //! ``` //! @@ -326,7 +326,7 @@ //! //! ```toml //! [dependencies.pyo3-async-runtimes] -//! version = "0.23" +//! version = "0.24" //! features = ["tokio-runtime"] //! ``` //! @@ -339,7 +339,7 @@ //! //! ```toml //! [dependencies.pyo3-async-runtimes] -//! version = "0.23" +//! version = "0.24" //! features = ["testing"] //! ``` @@ -398,10 +398,7 @@ use std::future::Future; use futures::channel::oneshot; use once_cell::sync::OnceCell; -use pyo3::{ - prelude::*, - types::{PyDict, PyTuple}, -}; +use pyo3::{call::PyCallArgs, prelude::*, types::PyDict}; static ASYNCIO: OnceCell = OnceCell::new(); static CONTEXTVARS: OnceCell = OnceCell::new(); @@ -579,7 +576,7 @@ impl PyEnsureFuture { fn call_soon_threadsafe<'py>( event_loop: &Bound<'py, PyAny>, context: &Bound, - args: impl IntoPyObject<'py, Target = PyTuple>, + args: impl PyCallArgs<'py>, ) -> PyResult<()> { let py = event_loop.py(); diff --git a/src/testing.rs b/src/testing.rs index 8bfc55f..cc594b5 100644 --- a/src/testing.rs +++ b/src/testing.rs @@ -64,7 +64,7 @@ //! Also add the `testing` and `attributes` features to the `pyo3-async-runtimes` dependency and select your preferred runtime: //! //! ```toml -//! pyo3-async-runtimes = { version = "0.23", features = ["testing", "attributes", "async-std-runtime"] } +//! pyo3-async-runtimes = { version = "0.24", features = ["testing", "attributes", "async-std-runtime"] } //! ``` //! //! At this point, you should be able to run the test via `cargo test` diff --git a/src/tokio.rs b/src/tokio.rs index 47e6da0..750a74a 100644 --- a/src/tokio.rs +++ b/src/tokio.rs @@ -9,7 +9,7 @@ //! //! ```toml //! [dependencies.pyo3-async-runtimes] -//! version = "0.23" +//! version = "0.24" //! features = ["unstable-streams"] //! ``` From a2f3e9b660e322437e10c1ce1ece1a45ab582bd8 Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Mon, 10 Mar 2025 12:23:12 -0400 Subject: [PATCH 2/4] Remove settings.json --- .gitignore | 3 ++- .vscode/settings.json | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index f2f9e58..8094f6e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +.vscode target -Cargo.lock \ No newline at end of file +Cargo.lock diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 6f5c4ed..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "rust-analyzer.cargo.features": "all" -} From 6b6483a2eead08a1ca5a08954d52f8495987121c Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Tue, 11 Mar 2025 10:37:20 -0400 Subject: [PATCH 3/4] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63c547b..dd9cac0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ To see unreleased changes, please see the CHANGELOG on the main branch. +## [0.24.0] - 2025-03-11 + +- Bump to pyo3 0.24. [#34](https://github.com/PyO3/pyo3-async-runtimes/pull/34) + ## [0.23.0] - 2024-11-22 - Bump minimum version of `pyo3` dependency to 0.23. [#21](https://github.com/PyO3/pyo3-async-runtimes/pull/21) From 988331ecfc6ab9eb762521f18966166ca2ee9d4f Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Tue, 11 Mar 2025 10:49:58 -0400 Subject: [PATCH 4/4] pin once_cell --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2832413..fe4e419 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,6 +118,7 @@ jobs: name: Set MSRV dependencies run: | cargo add tokio@=1.38.1 + cargo update -p once_cell --precise 1.20.3 - name: Build (no features) run: cargo build --no-default-features --verbose --target ${{ matrix.platform.rust-target }}