From 9ed0bc3371ce5aeb71dbf9970c620f7ac654a5c8 Mon Sep 17 00:00:00 2001 From: gnzsnz <8376642+gnzsnz@users.noreply.github.com> Date: Sat, 3 Jan 2026 11:57:36 +0100 Subject: [PATCH] fix: upgrade nest_asyncio to nest-asyncio2 to support p314. ipython, qt and tk are working with nest_asyncio2. --- ib_async/util.py | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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]