Skip to content

Commit 7ec57cb

Browse files
Fix Lite dependencies (#9719)
* Fix Lite dependencies * add changeset * add changeset * add changeset --------- Co-authored-by: gradio-pr-bot <[email protected]>
1 parent 1500c3b commit 7ec57cb

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

.changeset/calm-roses-suffer.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@gradio/wasm": patch
3+
"gradio": patch
4+
---
5+
6+
fix:Fix Lite dependencies

js/wasm/src/webworker/index.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,6 @@ async function initializeEnvironment(
8080
updateProgress("Loading Gradio wheels");
8181
await pyodide.loadPackage(["ssl", "setuptools"]);
8282
await micropip.add_mock_package("ffmpy", "0.3.0");
83-
await micropip.install.callKwargs(
84-
[
85-
"typing-extensions>=4.8.0", // Typing extensions needs to be installed first otherwise the versions from the pyodide lockfile is used which is incompatible with the latest fastapi.
86-
"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.
87-
"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.
88-
"fastapi<0.111.0" // `fastapi==0.111.0` added `ujson` as a dependency, but it's not available on Pyodide yet.
89-
],
90-
{ keep_going: true }
91-
);
9283
await micropip.install.callKwargs(gradioWheelUrls, {
9384
keep_going: true
9485
});

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ python-multipart>=0.0.9 # required for fastapi forms
1717
pydub
1818
pyyaml>=5.0,<7.0
1919
semantic_version~=2.0
20-
starlette>=0.40.0,<1.0
20+
starlette>=0.40.0,<1.0; sys.platform != 'emscripten'
2121
typing_extensions~=4.0
2222
urllib3~=2.0; sys.platform == 'emscripten' # urllib3 is used for Lite support. Version spec can be omitted because urllib3==2.1.0 is prebuilt for Pyodide and urllib>=2.2.0 supports Pyodide as well.
2323
uvicorn>=0.14.0; sys.platform != 'emscripten'

0 commit comments

Comments
 (0)