Skip to content

Commit

Permalink
Update Streamlit to 1.38.0 (#1101)
Browse files Browse the repository at this point in the history
* Update Streamlit to 1.38.0

* Update yarn.lock

* Fix import

* Update the streamlit submodule rebasing it

* Update samples
  • Loading branch information
whitphx authored Aug 30, 2024
1 parent 8d1802c commit dac8862
Show file tree
Hide file tree
Showing 20 changed files with 395 additions and 97 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"makefile.extensionOutputFolder": "./.vscode"
"python.analysis.extraPaths": ["./streamlit/lib"]
}
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ desktop := packages/desktop/build/*
kernel := packages/kernel/dist/*
stlite-lib-wheel := packages/kernel/py/stlite-lib/dist/stlite_lib-0.1.0-py3-none-any.whl
streamlit_proto := streamlit/frontend/lib/src/proto.d.ts
streamlit_wheel := packages/kernel/py/streamlit/lib/dist/streamlit-1.37.1-cp312-none-any.whl
streamlit_wheel := packages/kernel/py/streamlit/lib/dist/streamlit-1.38.0-cp312-none-any.whl
streamlit_frontend_lib_prod := streamlit/frontend/lib/dist/*

export USE_CONSTRAINTS_FILE := false # https://github.com/streamlit/streamlit/blob/1.27.0/.github/workflows/release.yml#L67-L68
Expand Down Expand Up @@ -134,7 +134,7 @@ $(streamlit_wheel): venv $(streamlit_proto) streamlit/lib/streamlit/**/*.py stre
exit 1; \
fi && \
cd streamlit && SNOWPARK_CONDA_BUILD=true $(MAKE) distribution && cd .. && \
pyodide py-compile --keep streamlit/lib/dist/streamlit-1.37.1-py2.py3-none-any.whl && \
pyodide py-compile --keep streamlit/lib/dist/streamlit-1.38.0-py2.py3-none-any.whl && \
mkdir -p $(dir $(streamlit_wheel)) && \
cp streamlit/lib/dist/$(notdir $(streamlit_wheel)) $(streamlit_wheel)

Expand Down
2 changes: 1 addition & 1 deletion packages/common-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"check:prettier": "prettier --check ."
},
"dependencies": {
"@streamlit/lib": "1.37.1"
"@streamlit/lib": "1.38.0"
},
"devDependencies": {
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/bin-src/dump_artifacts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ async function installPackages(
requirements.push(stliteLibWheel);
const streamlitWheel = await prepareLocalWheel(
pyodide,
path.join(wheelsDir, "streamlit-1.37.1-cp312-none-any.whl"),
path.join(wheelsDir, "streamlit-1.38.0-cp312-none-any.whl"),
);
requirements.push(streamlitWheel);

Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"@stlite/common": "^0.64.2",
"@stlite/common-react": "^0.64.2",
"@stlite/kernel": "^0.64.2",
"@streamlit/app": "1.37.1",
"@streamlit/app": "1.38.0",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.0.0",
"@types/jest": "^27.4.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/scripts/copy_wheels.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async function main() {
);
const streamlitWheelPath = path.join(
stliteKernelPyDir,
"streamlit/lib/dist/streamlit-1.37.1-cp312-none-any.whl",
"streamlit/lib/dist/streamlit-1.38.0-cp312-none-any.whl",
);

// Create the `wheels` directory
Expand Down
2 changes: 1 addition & 1 deletion packages/kernel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"dependencies": {
"@jupyterlab/coreutils": "^5.4.2",
"@stlite/common": "^0.64.2",
"@streamlit/lib": "1.37.1",
"@streamlit/lib": "1.38.0",
"path-browserify": "^1.0.1",
"react": "^18.2.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from streamlit.components.v1.components import declare_component
from streamlit.hello import Hello
from streamlit.runtime.runtime import Runtime
from streamlit.runtime.scriptrunner.script_run_context import add_script_run_ctx
from streamlit.runtime.scriptrunner_utils.script_run_context import add_script_run_ctx
from tests.testutil import create_mock_script_run_ctx

from stlite_lib.server import Server
Expand Down
2 changes: 1 addition & 1 deletion packages/kernel/src/kernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { assertStreamlitConfig } from "./types";
// https://github.com/pyodide/pyodide/pull/1859
// https://pyodide.org/en/stable/project/changelog.html#micropip
import STLITE_LIB_WHEEL from "!!file-loader?name=pypi/[name].[ext]&context=.!../py/stlite-lib/dist/stlite_lib-0.1.0-py3-none-any.whl"; // TODO: Extract the import statement to an auto-generated file like `_pypi.ts` in JupyterLite: https://github.com/jupyterlite/jupyterlite/blob/f2ecc9cf7189cb19722bec2f0fc7ff5dfd233d47/packages/pyolite-kernel/src/_pypi.ts
import STREAMLIT_WHEEL from "!!file-loader?name=pypi/[name].[ext]&context=.!../py/streamlit/lib/dist/streamlit-1.37.1-cp312-none-any.whl";
import STREAMLIT_WHEEL from "!!file-loader?name=pypi/[name].[ext]&context=.!../py/streamlit/lib/dist/streamlit-1.38.0-cp312-none-any.whl";

// Ref: https://github.com/streamlit/streamlit/blob/1.12.2/frontend/src/lib/UriUtil.ts#L32-L33
const FINAL_SLASH_RE = /\/+$/;
Expand Down
2 changes: 1 addition & 1 deletion packages/kernel/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default defineConfig({
),
"streamlit.whl": path.resolve(
__dirname,
"./py/streamlit/lib/dist/streamlit-1.37.1-cp312-none-any.whl",
"./py/streamlit/lib/dist/streamlit-1.38.0-cp312-none-any.whl",
),
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/mountable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
"@stlite/common-react": "^0.64.2",
"@stlite/kernel": "^0.64.2",
"@streamlit/app": "1.37.1",
"@streamlit/app": "1.38.0",
"@svgr/webpack": "^8.1.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.1.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import streamlit as st

st.json(
{"foo": "bar", "baz": "boz", "stuff": ["stuff 1", "stuff 2", "stuff 3", "stuff 5"]}
{
"foo": "bar",
"stuff": [
"stuff 1",
"stuff 2",
"stuff 3",
],
"level1": {"level2": {"level3": {"a": "b"}}},
},
expanded=2,
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ numpy
scipy
altair
pydeck
streamlit>=1.37.0
streamlit>=1.38.0
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ scipy
altair
pydeck
opencv-python
streamlit>=1.37.0
streamlit>=1.38.0
Original file line number Diff line number Diff line change
@@ -1 +1 @@
streamlit>=1.37.0
streamlit>=1.38.0
Original file line number Diff line number Diff line change
@@ -1 +1 @@
streamlit>=1.37.0
streamlit>=1.38.0
Original file line number Diff line number Diff line change
@@ -1 +1 @@
streamlit>=1.37.0
streamlit>=1.38.0
2 changes: 1 addition & 1 deletion packages/sharing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@stlite/common-react": "^0.64.2",
"@stlite/kernel": "^0.64.2",
"@stlite/sharing-common": "^0.64.2",
"@streamlit/app": "1.37.1",
"@streamlit/app": "1.38.0",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.0.0",
"@types/jest": "^27.4.3",
Expand Down
2 changes: 1 addition & 1 deletion streamlit
Submodule streamlit updated 964 files
Loading

0 comments on commit dac8862

Please sign in to comment.