streamlit-nightly 1.35.1.dev20240616__py2.py3-none-any.whl → 1.36.1.dev20240620__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit/commands/execution_control.py +6 -0
- streamlit/delta_generator.py +6 -1
- streamlit/emojis.py +1 -1
- streamlit/runtime/app_session.py +10 -6
- streamlit/runtime/fragment.py +13 -3
- streamlit/runtime/metrics_util.py +1 -1
- streamlit/runtime/scriptrunner/__init__.py +2 -6
- streamlit/runtime/scriptrunner/exceptions.py +45 -0
- streamlit/runtime/scriptrunner/exec_code.py +126 -0
- streamlit/runtime/scriptrunner/script_runner.py +75 -131
- streamlit/static/asset-manifest.json +2 -2
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{main.7994a814.js → main.ba32d829.js} +2 -2
- {streamlit_nightly-1.35.1.dev20240616.dist-info → streamlit_nightly-1.36.1.dev20240620.dist-info}/METADATA +4 -4
- {streamlit_nightly-1.35.1.dev20240616.dist-info → streamlit_nightly-1.36.1.dev20240620.dist-info}/RECORD +20 -18
- {streamlit_nightly-1.35.1.dev20240616.dist-info → streamlit_nightly-1.36.1.dev20240620.dist-info}/WHEEL +1 -1
- /streamlit/static/static/js/{main.7994a814.js.LICENSE.txt → main.ba32d829.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.35.1.dev20240616.data → streamlit_nightly-1.36.1.dev20240620.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.35.1.dev20240616.dist-info → streamlit_nightly-1.36.1.dev20240620.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.35.1.dev20240616.dist-info → streamlit_nightly-1.36.1.dev20240620.dist-info}/top_level.txt +0 -0
@@ -65,6 +65,12 @@ def rerun() -> NoReturn: # type: ignore[misc]
|
|
65
65
|
|
66
66
|
ctx = get_script_run_ctx()
|
67
67
|
|
68
|
+
# TODO: (rerun[scope] project): in order to make it a fragment-scoped rerun, pass
|
69
|
+
# the fragment_id_queue to the RerunData object and add the following line:
|
70
|
+
# fragment_id_queue=[ctx.current_fragment_id] if scope == "fragment" else []
|
71
|
+
# The script_runner RerunException is checking for the fragment_id_queue to decide
|
72
|
+
# whether or not to reset the dg_stack.
|
73
|
+
|
68
74
|
if ctx and ctx.script_requests:
|
69
75
|
query_string = ctx.query_string
|
70
76
|
page_script_hash = ctx.page_script_hash
|
streamlit/delta_generator.py
CHANGED
@@ -673,11 +673,16 @@ sidebar_dg = DeltaGenerator(root_container=RootContainer.SIDEBAR, parent=main_dg
|
|
673
673
|
event_dg = DeltaGenerator(root_container=RootContainer.EVENT, parent=main_dg)
|
674
674
|
bottom_dg = DeltaGenerator(root_container=RootContainer.BOTTOM, parent=main_dg)
|
675
675
|
|
676
|
+
|
676
677
|
# The dg_stack tracks the currently active DeltaGenerator, and is pushed to when
|
677
678
|
# a DeltaGenerator is entered via a `with` block. This is implemented as a ContextVar
|
678
679
|
# so that different threads or async tasks can have their own stacks.
|
680
|
+
def get_default_dg_stack() -> tuple[DeltaGenerator, ...]:
|
681
|
+
return (main_dg,)
|
682
|
+
|
683
|
+
|
679
684
|
dg_stack: ContextVar[tuple[DeltaGenerator, ...]] = ContextVar(
|
680
|
-
"dg_stack", default=(
|
685
|
+
"dg_stack", default=get_default_dg_stack()
|
681
686
|
)
|
682
687
|
|
683
688
|
|