@@ -54,9 +54,9 @@ Here we initialize the runtime, import Python's `asyncio` library and run the gi
5454``` toml
5555# Cargo.toml dependencies
5656[dependencies ]
57- pyo3 = { version = " 0.20 " }
58- pyo3-asyncio-0-21 = { version = " 0.20 " , features = [" attributes" , " async-std-runtime" ] }
59- async-std = " 1.9 "
57+ pyo3 = { version = " 0.22 " }
58+ pyo3-async-runtimes = { version = " 0.22 " , features = [" attributes" , " async-std-runtime" ] }
59+ async-std = " 1.13 "
6060```
6161
6262``` rust
@@ -84,9 +84,9 @@ attribute.
8484``` toml
8585# Cargo.toml dependencies
8686[dependencies ]
87- pyo3 = { version = " 0.20 " }
88- pyo3-asyncio-0-21 = { version = " 0.20 " , features = [" attributes" , " tokio-runtime" ] }
89- tokio = " 1.9 "
87+ pyo3 = { version = " 0.22 " }
88+ pyo3-async-runtimes = { version = " 0.22 " , features = [" attributes" , " tokio-runtime" ] }
89+ tokio = " 1.40 "
9090```
9191
9292``` rust
@@ -129,18 +129,18 @@ For `async-std`:
129129
130130``` toml
131131[dependencies ]
132- pyo3 = { version = " 0.20 " , features = [" extension-module" ] }
133- pyo3-asyncio-0-21 = { version = " 0.20 " , features = [" async-std-runtime" ] }
134- async-std = " 1.9 "
132+ pyo3 = { version = " 0.22 " , features = [" extension-module" ] }
133+ pyo3-async-runtimes = { version = " 0.22 " , features = [" async-std-runtime" ] }
134+ async-std = " 1.13 "
135135```
136136
137137For ` tokio ` :
138138
139139``` toml
140140[dependencies ]
141141pyo3 = { version = " 0.20" , features = [" extension-module" ] }
142- pyo3-asyncio-0-21 = { version = " 0.20 " , features = [" tokio-runtime" ] }
143- tokio = " 1.9 "
142+ pyo3-async-runtimes = { version = " 0.22 " , features = [" tokio-runtime" ] }
143+ tokio = " 1.40 "
144144```
145145
146146Export an async function that makes use of ` async-std ` :
@@ -228,7 +228,7 @@ to do something special with the object that it returns.
228228
229229Normally in Python, that something special is the ` await ` keyword, but in order to await this
230230coroutine in Rust, we first need to convert it into Rust's version of a ` coroutine ` : a ` Future ` .
231- That's where ` pyo3-asyncio ` comes in.
231+ That's where ` pyo3-async-runtimes ` comes in.
232232[ ` pyo3_async_runtimes::into_future ` ] ( https://docs.rs/pyo3-asyncio/latest/pyo3_asyncio/fn.into_future.html )
233233performs this conversion for us:
234234
@@ -433,10 +433,10 @@ name = "my_async_module"
433433crate-type = [" cdylib" ]
434434
435435[dependencies ]
436- pyo3 = { version = " 0.20 " , features = [" extension-module" ] }
437- pyo3-asyncio-0-21 = { version = " 0.20 " , features = [" tokio-runtime" ] }
438- async-std = " 1.9 "
439- tokio = " 1.9 "
436+ pyo3 = { version = " 0.22 " , features = [" extension-module" ] }
437+ pyo3-async-runtimes = { version = " 0.22 " , features = [" tokio-runtime" ] }
438+ async-std = " 1.13 "
439+ tokio = " 1.40 "
440440```
441441
442442``` rust
@@ -492,9 +492,9 @@ event loop before we can install the `uvloop` policy.
492492
493493``` toml
494494[dependencies ]
495- async-std = " 1.9 "
496- pyo3 = " 0.20 "
497- pyo3-asyncio-0-21 = { version = " 0.20 " , features = [" async-std-runtime" ] }
495+ async-std = " 1.13 "
496+ pyo3 = " 0.22 "
497+ pyo3-async-runtimes = { version = " 0.22 " , features = [" async-std-runtime" ] }
498498```
499499
500500``` rust no_run
0 commit comments