From 7ea45723bedb374791de0b7136a3da57d99ad3df Mon Sep 17 00:00:00 2001 From: "Mark E. Haase" Date: Tue, 30 Mar 2021 21:06:39 -0400 Subject: [PATCH] Update Trio mode for compatibility with Trio >= 0.18.0 The Trio package renamed their trio.hazmat module to trio.lowlevel. --- ipykernel/trio_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipykernel/trio_runner.py b/ipykernel/trio_runner.py index 4ba1da196..d78e516aa 100644 --- a/ipykernel/trio_runner.py +++ b/ipykernel/trio_runner.py @@ -39,7 +39,7 @@ def log_nursery_exc(exc): exc) async def trio_main(): - self._trio_token = trio.hazmat.current_trio_token() + self._trio_token = trio.lowlevel.current_trio_token() async with trio.open_nursery() as nursery: # TODO This hack prevents the nursery from cancelling all child # tasks when an uncaught exception occurs, but it's ugly.