diff --git a/ib_async/util.py b/ib_async/util.py index fdf05d4c..8d717e1b 100644 --- a/ib_async/util.py +++ b/ib_async/util.py @@ -476,9 +476,9 @@ async def waitUntilAsync(t: Time_t) -> bool: def patchAsyncio(): """Patch asyncio to allow nested event loops.""" - import nest_asyncio + import nest_asyncio2 - nest_asyncio.apply() + nest_asyncio2.apply() def getLoop(): diff --git a/pyproject.toml b/pyproject.toml index 270c2ed7..beb9198f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ keywords = ["ibapi", "tws", "asyncio", "jupyter", "interactive", "brokers", "asy python = ">=3.10" aeventkit = "^2.1.0" # aeventkit = { path = "../eventkit", develop = true } -nest_asyncio = "*" +nest-asyncio2 = "*" tzdata = "^2025.2" [tool.poetry.urls]