Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"rust-analyzer.cargo.features": "all"
}
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
"David Hewitt <[email protected]>",
Expand Down Expand Up @@ -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"
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
```

Expand Down Expand Up @@ -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"
```

Expand Down Expand Up @@ -130,17 +130,17 @@ 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"
```

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"
```

Expand Down Expand Up @@ -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"
```
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyo3-async-runtimes-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
"David Hewitt <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion src/async_std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//!
//! ```toml
//! [dependencies.pyo3-async-runtimes]
//! version = "0.23"
//! version = "0.24"
//! features = ["unstable-streams"]
//! ```

Expand Down
2 changes: 1 addition & 1 deletion src/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//!
//! ```toml
//! [dependencies.pyo3-async-runtimes]
//! version = "0.23"
//! version = "0.24"
//! features = ["unstable-streams"]
//! ```

Expand Down
15 changes: 6 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
//!
//! ```toml
//! [dependencies.pyo3-async-runtimes]
//! version = "0.23"
//! version = "0.24"
//! features = ["attributes"]
//! ```
//!
Expand All @@ -313,7 +313,7 @@
//!
//! ```toml
//! [dependencies.pyo3-async-runtimes]
//! version = "0.23"
//! version = "0.24"
//! features = ["async-std-runtime"]
//! ```
//!
Expand All @@ -326,7 +326,7 @@
//!
//! ```toml
//! [dependencies.pyo3-async-runtimes]
//! version = "0.23"
//! version = "0.24"
//! features = ["tokio-runtime"]
//! ```
//!
Expand All @@ -339,7 +339,7 @@
//!
//! ```toml
//! [dependencies.pyo3-async-runtimes]
//! version = "0.23"
//! version = "0.24"
//! features = ["testing"]
//! ```

Expand Down Expand Up @@ -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<PyObject> = OnceCell::new();
static CONTEXTVARS: OnceCell<PyObject> = OnceCell::new();
Expand Down Expand Up @@ -579,7 +576,7 @@ impl PyEnsureFuture {
fn call_soon_threadsafe<'py>(
event_loop: &Bound<'py, PyAny>,
context: &Bound<PyAny>,
args: impl IntoPyObject<'py, Target = PyTuple>,
args: impl PyCallArgs<'py>,
) -> PyResult<()> {
let py = event_loop.py();

Expand Down
2 changes: 1 addition & 1 deletion src/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion src/tokio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//!
//! ```toml
//! [dependencies.pyo3-async-runtimes]
//! version = "0.23"
//! version = "0.24"
//! features = ["unstable-streams"]
//! ```

Expand Down