You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -518,7 +518,7 @@ fn main() -> PyResult<()> {
518
518
```
519
519
520
520
### Additional Information
521
-
- Managing event loop references can be tricky with pyo3-asyncio. See [Event Loop References](https://awestlake87.github.io/pyo3-asyncio/master/doc/pyo3_asyncio/#event-loop-references) in the API docs to get a better intuition for how event loop references are managed in this library.
521
+
- Managing event loop references can be tricky with pyo3-asyncio. See [Event Loop References and ContextVars](https://awestlake87.github.io/pyo3-asyncio/master/doc/pyo3_asyncio/#event-loop-references-and-contextvars) in the API docs to get a better intuition for how event loop references are managed in this library.
522
522
- Testing pyo3-asyncio libraries and applications requires a custom test harness since Python requires control over the main thread. You can find a testing guide in the [API docs for the `testing` module](https://awestlake87.github.io/pyo3-asyncio/master/doc/pyo3_asyncio/testing)
523
523
524
524
## Migration Guide
@@ -530,7 +530,7 @@ Well, a lot actually. There were some pretty major flaws in the initialization b
530
530
531
531
To make things a bit easier, I decided to keep most of the old API alongside the new one (with some deprecation warnings to encourage users to move away from it). It should be possible to use the `v0.13` API alongside the newer `v0.14` API, which should allow you to upgrade your application piecemeal rather than all at once.
532
532
533
-
__Before you get started, I personally recommend taking a look at [Event Loop References](https://awestlake87.github.io/pyo3-asyncio/master/doc/pyo3_asyncio/#event-loop-references) in order to get a better grasp on the motivation behind these changes and the nuance involved in using the new conversions.__
533
+
__Before you get started, I personally recommend taking a look at [Event Loop References and ContextVars](https://awestlake87.github.io/pyo3-asyncio/master/doc/pyo3_asyncio/#event-loop-references-and-contextvars) in order to get a better grasp on the motivation behind these changes and the nuance involved in using the new conversions.__
534
534
535
535
### 0.14 Highlights
536
536
- Tokio initialization is now lazy.
@@ -610,7 +610,7 @@ __Before you get started, I personally recommend taking a look at [Event Loop Re
610
610
}
611
611
```
612
612
4.Replaceconversionswiththeirnewercounterparts.
613
-
> Youmayencountersomeissuesregardingtheusageof `get_running_loop` vs `get_event_loop`.Formoredetailsonthesenewerconversionsandhowtheyshouldbeusedsee [EventLoopReferences](https://awestlake87.github.io/pyo3-asyncio/master/doc/pyo3_asyncio/#event-loop-references).
613
+
> Youmayencountersomeissuesregardingtheusageof `get_running_loop` vs `get_event_loop`.Formoredetailsonthesenewerconversionsandhowtheyshouldbeusedsee [EventLoopReferencesandContextVars](https://awestlake87.github.io/pyo3-asyncio/master/doc/pyo3_asyncio/#event-loop-references-and-contextvars).
614
614
-Replace `pyo3_asyncio::into_future` with `pyo3_asyncio::<runtime>::into_future`
615
615
-Replace `pyo3_asyncio::<runtime>::into_coroutine` with `pyo3_asyncio::<runtime>::future_into_py`
616
616
-Replace `pyo3_asyncio::get_event_loop` with `pyo3_asyncio::<runtime>::get_current_loop`
0 commit comments