From 686719a3b0bcd64479a5f3c485da4620d0747341 Mon Sep 17 00:00:00 2001 From: "Yuichiro Tachibana (Tsuchiya)" Date: Wed, 18 Oct 2023 18:16:58 +0900 Subject: [PATCH] Lite: Explicitly install a specific version of `anyio` to avoid version conflicts (#5980) * Lite: Explicitly install a specific version of `anyio` to avoid version conflicts * add changeset --------- Co-authored-by: gradio-pr-bot --- .changeset/shy-ghosts-turn.md | 5 +++++ js/wasm/src/webworker/index.ts | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/shy-ghosts-turn.md diff --git a/.changeset/shy-ghosts-turn.md b/.changeset/shy-ghosts-turn.md new file mode 100644 index 0000000000..5b5420a999 --- /dev/null +++ b/.changeset/shy-ghosts-turn.md @@ -0,0 +1,5 @@ +--- +"@gradio/wasm": patch +--- + +fix:Lite: Explicitly install a specific version of `anyio` to avoid version conflicts diff --git a/js/wasm/src/webworker/index.ts b/js/wasm/src/webworker/index.ts index 09ed0ee16b..e0aa66df06 100644 --- a/js/wasm/src/webworker/index.ts +++ b/js/wasm/src/webworker/index.ts @@ -75,6 +75,7 @@ async function loadPyodideAndPackages( await micropip.add_mock_package("aiohttp", "3.8.4"); await pyodide.loadPackage(["ssl", "distutils", "setuptools"]); await micropip.install(["markdown-it-py[linkify]~=2.2.0"]); // On 3rd June 2023, markdown-it-py 3.0.0 has been released. The `gradio` package depends on its `>=2.0.0` version so its 3.x will be resolved. However, it conflicts with `mdit-py-plugins`'s dependency `markdown-it-py >=1.0.0,<3.0.0` and micropip currently can't resolve it. So we explicitly install the compatible version of the library here. + await micropip.install(["anyio==3.*"]); // `fastapi` depends on `anyio>=3.4.0,<5` so its 4.* can be installed, but it conflicts with the anyio version `httpx` depends on, `==3.*`. Seems like micropip can't resolve it for now, so we explicitly install the compatible version of the library here. await micropip.install.callKwargs(gradioWheelUrls, { keep_going: true });