streamlit-nightly 1.41.2.dev20241227__py2.py3-none-any.whl → 1.41.2.dev20250124__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/__init__.py +11 -2
- streamlit/__main__.py +1 -1
- streamlit/auth_util.py +209 -0
- streamlit/cli_util.py +1 -1
- streamlit/column_config.py +1 -1
- streamlit/commands/__init__.py +1 -1
- streamlit/commands/echo.py +1 -1
- streamlit/commands/execution_control.py +1 -1
- streamlit/commands/experimental_query_params.py +1 -1
- streamlit/commands/logo.py +1 -1
- streamlit/commands/navigation.py +16 -15
- streamlit/commands/page_config.py +1 -1
- streamlit/components/__init__.py +1 -1
- streamlit/components/lib/__init__.py +1 -1
- streamlit/components/lib/local_component_registry.py +1 -1
- streamlit/components/types/__init__.py +1 -1
- streamlit/components/types/base_component_registry.py +1 -1
- streamlit/components/types/base_custom_component.py +1 -1
- streamlit/components/v1/__init__.py +1 -1
- streamlit/components/v1/component_arrow.py +1 -1
- streamlit/components/v1/component_registry.py +1 -1
- streamlit/components/v1/components.py +1 -1
- streamlit/components/v1/custom_component.py +1 -1
- streamlit/config.py +18 -3
- streamlit/config_option.py +10 -19
- streamlit/config_util.py +1 -1
- streamlit/connections/__init__.py +1 -1
- streamlit/connections/base_connection.py +1 -1
- streamlit/connections/snowflake_connection.py +31 -50
- streamlit/connections/snowpark_connection.py +1 -1
- streamlit/connections/sql_connection.py +1 -1
- streamlit/connections/util.py +1 -1
- streamlit/cursor.py +1 -1
- streamlit/dataframe_util.py +3 -3
- streamlit/delta_generator.py +7 -3
- streamlit/delta_generator_singletons.py +1 -1
- streamlit/deprecation_util.py +1 -1
- streamlit/development.py +1 -1
- streamlit/elements/__init__.py +1 -1
- streamlit/elements/alert.py +1 -1
- streamlit/elements/arrow.py +25 -3
- streamlit/elements/balloons.py +1 -1
- streamlit/elements/bokeh_chart.py +1 -1
- streamlit/elements/code.py +9 -1
- streamlit/elements/deck_gl_json_chart.py +1 -1
- streamlit/elements/dialog_decorator.py +1 -1
- streamlit/elements/doc_string.py +1 -1
- streamlit/elements/empty.py +1 -1
- streamlit/elements/exception.py +8 -10
- streamlit/elements/form.py +1 -1
- streamlit/elements/graphviz_chart.py +1 -1
- streamlit/elements/heading.py +1 -1
- streamlit/elements/html.py +1 -1
- streamlit/elements/iframe.py +1 -1
- streamlit/elements/image.py +1 -1
- streamlit/elements/json.py +1 -1
- streamlit/elements/layouts.py +1 -1
- streamlit/elements/lib/__init__.py +1 -1
- streamlit/elements/lib/built_in_chart_utils.py +1 -1
- streamlit/elements/lib/color_util.py +1 -1
- streamlit/elements/lib/column_config_utils.py +1 -1
- streamlit/elements/lib/column_types.py +1 -1
- streamlit/elements/lib/dialog.py +1 -1
- streamlit/elements/lib/dicttools.py +1 -1
- streamlit/elements/lib/event_utils.py +1 -1
- streamlit/elements/lib/file_uploader_utils.py +1 -1
- streamlit/elements/lib/form_utils.py +1 -1
- streamlit/elements/lib/image_utils.py +1 -1
- streamlit/elements/lib/js_number.py +1 -1
- streamlit/elements/lib/mutable_status_container.py +1 -1
- streamlit/elements/lib/options_selector_utils.py +1 -1
- streamlit/elements/lib/pandas_styler_utils.py +1 -1
- streamlit/elements/lib/policies.py +1 -1
- streamlit/elements/lib/streamlit_plotly_theme.py +1 -1
- streamlit/elements/lib/subtitle_utils.py +1 -1
- streamlit/elements/lib/utils.py +1 -1
- streamlit/elements/map.py +1 -1
- streamlit/elements/markdown.py +3 -3
- streamlit/elements/media.py +1 -1
- streamlit/elements/metric.py +1 -1
- streamlit/elements/plotly_chart.py +1 -1
- streamlit/elements/progress.py +1 -1
- streamlit/elements/pyplot.py +1 -1
- streamlit/elements/snow.py +1 -1
- streamlit/elements/spinner.py +14 -7
- streamlit/elements/text.py +1 -1
- streamlit/elements/toast.py +1 -1
- streamlit/elements/vega_charts.py +20 -6
- streamlit/elements/widgets/__init__.py +1 -1
- streamlit/elements/widgets/audio_input.py +1 -1
- streamlit/elements/widgets/button.py +9 -8
- streamlit/elements/widgets/button_group.py +6 -4
- streamlit/elements/widgets/camera_input.py +1 -1
- streamlit/elements/widgets/chat.py +1 -1
- streamlit/elements/widgets/checkbox.py +1 -1
- streamlit/elements/widgets/color_picker.py +1 -1
- streamlit/elements/widgets/data_editor.py +6 -5
- streamlit/elements/widgets/file_uploader.py +1 -1
- streamlit/elements/widgets/multiselect.py +1 -1
- streamlit/elements/widgets/number_input.py +1 -1
- streamlit/elements/widgets/radio.py +1 -1
- streamlit/elements/widgets/select_slider.py +1 -1
- streamlit/elements/widgets/selectbox.py +1 -1
- streamlit/elements/widgets/slider.py +1 -1
- streamlit/elements/widgets/text_widgets.py +1 -1
- streamlit/elements/widgets/time_widgets.py +63 -3
- streamlit/elements/write.py +2 -2
- streamlit/emojis.py +2 -2
- streamlit/env_util.py +1 -1
- streamlit/error_util.py +9 -3
- streamlit/errors.py +5 -1
- streamlit/external/__init__.py +1 -1
- streamlit/external/langchain/__init__.py +1 -1
- streamlit/external/langchain/streamlit_callback_handler.py +1 -1
- streamlit/file_util.py +1 -1
- streamlit/git_util.py +1 -1
- streamlit/hello/__init__.py +1 -1
- streamlit/hello/animation_demo.py +1 -1
- streamlit/hello/dataframe_demo.py +1 -1
- streamlit/hello/hello.py +1 -1
- streamlit/hello/mapping_demo.py +1 -1
- streamlit/hello/plotting_demo.py +1 -1
- streamlit/hello/streamlit_app.py +1 -1
- streamlit/hello/utils.py +1 -1
- streamlit/logger.py +1 -1
- streamlit/material_icon_names.py +2 -2
- streamlit/navigation/__init__.py +1 -1
- streamlit/navigation/page.py +7 -4
- streamlit/net_util.py +1 -1
- streamlit/platform.py +1 -1
- streamlit/proto/Alert_pb2.pyi +1 -1
- streamlit/proto/AppPage_pb2.pyi +1 -1
- streamlit/proto/ArrowNamedDataSet_pb2.pyi +1 -1
- streamlit/proto/ArrowVegaLiteChart_pb2.pyi +1 -1
- streamlit/proto/Arrow_pb2.pyi +1 -1
- streamlit/proto/AudioInput_pb2.pyi +1 -1
- streamlit/proto/Audio_pb2.pyi +1 -1
- streamlit/proto/AuthRedirect_pb2.py +27 -0
- streamlit/proto/AuthRedirect_pb2.pyi +41 -0
- streamlit/proto/AutoRerun_pb2.pyi +1 -1
- streamlit/proto/BackMsg_pb2.pyi +1 -1
- streamlit/proto/Balloons_pb2.pyi +1 -1
- streamlit/proto/Block_pb2.pyi +1 -1
- streamlit/proto/BokehChart_pb2.pyi +1 -1
- streamlit/proto/ButtonGroup_pb2.pyi +1 -1
- streamlit/proto/Button_pb2.pyi +1 -1
- streamlit/proto/CameraInput_pb2.pyi +1 -1
- streamlit/proto/ChatInput_pb2.pyi +1 -1
- streamlit/proto/Checkbox_pb2.pyi +1 -1
- streamlit/proto/ClientState_pb2.pyi +1 -1
- streamlit/proto/Code_pb2.py +2 -2
- streamlit/proto/Code_pb2.pyi +5 -2
- streamlit/proto/ColorPicker_pb2.pyi +1 -1
- streamlit/proto/Common_pb2.pyi +1 -1
- streamlit/proto/Components_pb2.pyi +1 -1
- streamlit/proto/DataFrame_pb2.pyi +1 -1
- streamlit/proto/DateInput_pb2.pyi +1 -1
- streamlit/proto/DeckGlJsonChart_pb2.pyi +1 -1
- streamlit/proto/Delta_pb2.pyi +1 -1
- streamlit/proto/DocString_pb2.pyi +1 -1
- streamlit/proto/DownloadButton_pb2.pyi +1 -1
- streamlit/proto/Element_pb2.pyi +1 -1
- streamlit/proto/Empty_pb2.pyi +1 -1
- streamlit/proto/Exception_pb2.pyi +1 -1
- streamlit/proto/Favicon_pb2.pyi +1 -1
- streamlit/proto/FileUploader_pb2.pyi +1 -1
- streamlit/proto/ForwardMsg_pb2.py +12 -9
- streamlit/proto/ForwardMsg_pb2.pyi +34 -4
- streamlit/proto/GitInfo_pb2.pyi +1 -1
- streamlit/proto/GraphVizChart_pb2.pyi +1 -1
- streamlit/proto/Heading_pb2.pyi +1 -1
- streamlit/proto/Html_pb2.pyi +1 -1
- streamlit/proto/IFrame_pb2.pyi +1 -1
- streamlit/proto/Image_pb2.pyi +1 -1
- streamlit/proto/Json_pb2.pyi +1 -1
- streamlit/proto/LabelVisibilityMessage_pb2.pyi +1 -1
- streamlit/proto/LinkButton_pb2.pyi +1 -1
- streamlit/proto/Logo_pb2.pyi +1 -1
- streamlit/proto/Markdown_pb2.pyi +1 -1
- streamlit/proto/Metric_pb2.pyi +1 -1
- streamlit/proto/MetricsEvent_pb2.pyi +1 -1
- streamlit/proto/MultiSelect_pb2.pyi +1 -1
- streamlit/proto/NamedDataSet_pb2.pyi +1 -1
- streamlit/proto/Navigation_pb2.pyi +1 -1
- streamlit/proto/NewSession_pb2.pyi +1 -1
- streamlit/proto/NumberInput_pb2.pyi +1 -1
- streamlit/proto/PageConfig_pb2.pyi +1 -1
- streamlit/proto/PageInfo_pb2.pyi +1 -1
- streamlit/proto/PageLink_pb2.pyi +1 -1
- streamlit/proto/PageNotFound_pb2.pyi +1 -1
- streamlit/proto/PageProfile_pb2.pyi +1 -1
- streamlit/proto/PagesChanged_pb2.pyi +1 -1
- streamlit/proto/ParentMessage_pb2.pyi +1 -1
- streamlit/proto/PlotlyChart_pb2.pyi +1 -1
- streamlit/proto/Progress_pb2.pyi +1 -1
- streamlit/proto/Radio_pb2.pyi +1 -1
- streamlit/proto/RootContainer_pb2.pyi +1 -1
- streamlit/proto/Selectbox_pb2.pyi +1 -1
- streamlit/proto/SessionEvent_pb2.pyi +1 -1
- streamlit/proto/SessionStatus_pb2.pyi +1 -1
- streamlit/proto/Skeleton_pb2.pyi +1 -1
- streamlit/proto/Slider_pb2.pyi +1 -1
- streamlit/proto/Snow_pb2.pyi +1 -1
- streamlit/proto/Spinner_pb2.py +2 -2
- streamlit/proto/Spinner_pb2.pyi +6 -2
- streamlit/proto/TextArea_pb2.pyi +1 -1
- streamlit/proto/TextInput_pb2.pyi +1 -1
- streamlit/proto/Text_pb2.pyi +1 -1
- streamlit/proto/TimeInput_pb2.pyi +1 -1
- streamlit/proto/Toast_pb2.pyi +1 -1
- streamlit/proto/VegaLiteChart_pb2.pyi +1 -1
- streamlit/proto/Video_pb2.pyi +1 -1
- streamlit/proto/WidgetStates_pb2.pyi +1 -1
- streamlit/proto/__init__.py +1 -1
- streamlit/runtime/__init__.py +1 -1
- streamlit/runtime/app_session.py +29 -5
- streamlit/runtime/caching/__init__.py +1 -1
- streamlit/runtime/caching/cache_data_api.py +3 -3
- streamlit/runtime/caching/cache_errors.py +1 -1
- streamlit/runtime/caching/cache_resource_api.py +1 -1
- streamlit/runtime/caching/cache_type.py +1 -1
- streamlit/runtime/caching/cache_utils.py +5 -4
- streamlit/runtime/caching/cached_message_replay.py +1 -1
- streamlit/runtime/caching/hashing.py +1 -1
- streamlit/runtime/caching/legacy_cache_api.py +1 -1
- streamlit/runtime/caching/storage/__init__.py +1 -1
- streamlit/runtime/caching/storage/cache_storage_protocol.py +1 -1
- streamlit/runtime/caching/storage/dummy_cache_storage.py +1 -1
- streamlit/runtime/caching/storage/in_memory_cache_storage_wrapper.py +1 -1
- streamlit/runtime/caching/storage/local_disk_cache_storage.py +5 -5
- streamlit/runtime/connection_factory.py +1 -1
- streamlit/runtime/context.py +1 -1
- streamlit/runtime/credentials.py +5 -5
- streamlit/runtime/forward_msg_cache.py +4 -2
- streamlit/runtime/forward_msg_queue.py +33 -5
- streamlit/runtime/fragment.py +2 -2
- streamlit/runtime/media_file_manager.py +1 -1
- streamlit/runtime/media_file_storage.py +1 -1
- streamlit/runtime/memory_media_file_storage.py +1 -1
- streamlit/runtime/memory_session_storage.py +1 -1
- streamlit/runtime/memory_uploaded_file_manager.py +1 -1
- streamlit/runtime/metrics_util.py +2 -1
- streamlit/runtime/pages_manager.py +4 -2
- streamlit/runtime/runtime.py +22 -6
- streamlit/runtime/runtime_util.py +1 -1
- streamlit/runtime/script_data.py +1 -1
- streamlit/runtime/scriptrunner/__init__.py +1 -1
- streamlit/runtime/scriptrunner/exec_code.py +34 -1
- streamlit/runtime/scriptrunner/magic.py +1 -1
- streamlit/runtime/scriptrunner/magic_funcs.py +1 -1
- streamlit/runtime/scriptrunner/script_cache.py +1 -1
- streamlit/runtime/scriptrunner/script_runner.py +23 -12
- streamlit/runtime/scriptrunner_utils/__init__.py +1 -1
- streamlit/runtime/scriptrunner_utils/exceptions.py +1 -1
- streamlit/runtime/scriptrunner_utils/script_requests.py +2 -1
- streamlit/runtime/scriptrunner_utils/script_run_context.py +2 -2
- streamlit/runtime/secrets.py +1 -1
- streamlit/runtime/session_manager.py +2 -2
- streamlit/runtime/state/__init__.py +1 -1
- streamlit/runtime/state/common.py +1 -1
- streamlit/runtime/state/query_params.py +2 -2
- streamlit/runtime/state/query_params_proxy.py +15 -5
- streamlit/runtime/state/safe_session_state.py +1 -1
- streamlit/runtime/state/session_state.py +1 -1
- streamlit/runtime/state/session_state_proxy.py +1 -1
- streamlit/runtime/state/widgets.py +1 -1
- streamlit/runtime/stats.py +1 -1
- streamlit/runtime/uploaded_file_manager.py +1 -1
- streamlit/runtime/websocket_session_manager.py +2 -2
- streamlit/source_util.py +1 -1
- streamlit/static/index.html +3 -3
- streamlit/static/static/css/index.mUTQuMqR.css +1 -0
- streamlit/static/static/js/{FileDownload.esm.WslOojMp.js → FileDownload.esm.C1QvS8Zm.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.DSgVZ-NK.js → FormClearHelper.mT4-5rFn.js} +1 -1
- streamlit/static/static/js/{Hooks.wzeYp0oD.js → Hooks.CVNEuaGG.js} +1 -1
- streamlit/static/static/js/InputInstructions.BCvAGBeC.js +1 -0
- streamlit/static/static/js/{ProgressBar.D1he2Gib.js → ProgressBar.CcQcYD9u.js} +2 -2
- streamlit/static/static/js/RenderInPortalIfExists.DHDG9PHn.js +1 -0
- streamlit/static/static/js/Toolbar.yTE_O6B7.js +1 -0
- streamlit/static/static/js/{base-input.gDrmzpbY.js → base-input.CQPY9_oN.js} +4 -4
- streamlit/static/static/js/createSuper.DE47Tkz4.js +1 -0
- streamlit/static/static/js/data-grid-overlay-editor.5JEQwfzp.js +1 -0
- streamlit/static/static/js/{downloader.B-SkHjg2.js → downloader.CX7_KkfB.js} +1 -1
- streamlit/static/static/js/{es6.DoVDVSd_.js → es6.Be2vwxoI.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.Exq_q4jU.js → iframeResizer.contentWindow.CFHofqC-.js} +1 -1
- streamlit/static/static/js/index.0OeiPvr3.js +1 -0
- streamlit/static/static/js/index.1GBg_Cdb.js +1 -0
- streamlit/static/static/js/index.4nNgvhbk.js +4 -0
- streamlit/static/static/js/index.5F9_LJ-9.js +1 -0
- streamlit/static/static/js/index.6v5ZgUAy.js +1 -0
- streamlit/static/static/js/index.8tVXPrLX.js +1 -0
- streamlit/static/static/js/index.AExANgn1.js +1 -0
- streamlit/static/static/js/index.AXOgS1NM.js +1 -0
- streamlit/static/static/js/index.B-xzXPZE.js +3 -0
- streamlit/static/static/js/index.B0pfFJGU.js +1 -0
- streamlit/static/static/js/index.BBjf7kH1.js +1 -0
- streamlit/static/static/js/index.BGICDmL0.js +201 -0
- streamlit/static/static/js/{index.rDDlhQFp.js → index.BOeLQ18h.js} +1 -1
- streamlit/static/static/js/index.BUgJRfqp.js +3 -0
- streamlit/static/static/js/index.BpeIAypN.js +1 -0
- streamlit/static/static/js/{index.BjQJsYG6.js → index.C0ZNaKGF.js} +1 -1
- streamlit/static/static/js/index.C3eR9AQ5.js +1 -0
- streamlit/static/static/js/index.CCmrDm8Z.js +2 -0
- streamlit/static/static/js/index.CHuo89tL.js +1 -0
- streamlit/static/static/js/index.Cbi_d9ak.js +197 -0
- streamlit/static/static/js/{index.CyRDf6c5.js → index.Cg7T4wJt.js} +3 -3
- streamlit/static/static/js/index.Ci3iebpl.js +1 -0
- streamlit/static/static/js/index.CjsaBedq.js +1 -0
- streamlit/static/static/js/{index.CLHVvMN0.js → index.CvqaNor_.js} +139 -128
- streamlit/static/static/js/index.D0lxtOCO.js +2 -0
- streamlit/static/static/js/index.D1AD4NsW.js +1 -0
- streamlit/static/static/js/{index.4lqQPLdu.js → index.DLjk_wlB.js} +1 -1
- streamlit/static/static/js/{index.DfwGDOWW.js → index.DNDhYAPI.js} +2 -2
- streamlit/static/static/js/index.DY6666R7.js +1 -0
- streamlit/static/static/js/{index.DaTKmBKa.js → index.Dkr_c_9x.js} +100 -100
- streamlit/static/static/js/{index.Bcz23DKe.js → index.Hhv6gSq2.js} +12 -12
- streamlit/static/static/js/{index.Bm2n8u7I.js → index.OM83ZHKg.js} +2 -2
- streamlit/static/static/js/index.SLleoa9s.js +1 -0
- streamlit/static/static/js/{index.2Rr5kbVL.js → index.XCwDes79.js} +1 -1
- streamlit/static/static/js/{index.B_RzfO7U.js → index.a6pesEXT.js} +1 -1
- streamlit/static/static/js/{index.CAkYXoVB.js → index.er3Zfn3e.js} +2 -2
- streamlit/static/static/js/{index.CZ-znj8N.js → index.mtSGfsND.js} +1 -1
- streamlit/static/static/js/{input.28wXD4uV.js → input.B07wSbwn.js} +2 -2
- streamlit/static/static/js/{memory.jbWyoc5k.js → memory.CC_p93jh.js} +1 -1
- streamlit/static/static/js/mergeWith.ivc75cD1.js +1 -0
- streamlit/static/static/js/number-overlay-editor.Db2Be6nq.js +9 -0
- streamlit/static/static/js/possibleConstructorReturn.BNprLGNF.js +1 -0
- streamlit/static/static/js/{sandbox.CfK9-cKf.js → sandbox.BlG3HhHL.js} +1 -1
- streamlit/static/static/js/{textarea.C5OZk1uL.js → textarea.Bz6Z-kmO.js} +2 -2
- streamlit/static/static/js/threshold.B8r8f5kt.js +1 -0
- streamlit/static/static/js/{timepicker.DEpQEk7W.js → timepicker.BMSb5NlP.js} +3 -3
- streamlit/static/static/js/timer.RueuYoQV.js +1 -0
- streamlit/static/static/js/toConsumableArray.uYLXBIlD.js +3 -0
- streamlit/static/static/js/uniqueId.BdisvZXg.js +1 -0
- streamlit/static/static/js/{useBasicWidgetState.C2DsWpWi.js → useBasicWidgetState.BJFGEQDL.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.Bw6YkmJD.js → useOnInputChange.BmSN_ACz.js} +1 -1
- streamlit/static/static/js/value.iufjd77T.js +1 -0
- streamlit/static/static/js/withFullScreenWrapper.CbOOMX5j.js +1 -0
- streamlit/static/static/media/MaterialSymbols-Rounded.DzyB5T7Y.woff2 +0 -0
- streamlit/string_util.py +1 -1
- streamlit/temporary_directory.py +1 -1
- streamlit/testing/__init__.py +1 -1
- streamlit/testing/v1/__init__.py +1 -1
- streamlit/testing/v1/app_test.py +1 -1
- streamlit/testing/v1/element_tree.py +1 -1
- streamlit/testing/v1/local_script_runner.py +1 -1
- streamlit/testing/v1/util.py +1 -1
- streamlit/time_util.py +1 -1
- streamlit/type_util.py +2 -2
- streamlit/url_util.py +24 -1
- streamlit/user_info.py +445 -25
- streamlit/util.py +1 -1
- streamlit/version.py +1 -1
- streamlit/watcher/__init__.py +1 -1
- streamlit/watcher/event_based_path_watcher.py +1 -1
- streamlit/watcher/folder_black_list.py +1 -1
- streamlit/watcher/local_sources_watcher.py +5 -3
- streamlit/watcher/path_watcher.py +1 -1
- streamlit/watcher/polling_path_watcher.py +1 -1
- streamlit/watcher/util.py +87 -21
- streamlit/web/__init__.py +1 -1
- streamlit/web/bootstrap.py +22 -2
- streamlit/web/cache_storage_manager_config.py +1 -1
- streamlit/web/cli.py +1 -1
- streamlit/web/server/__init__.py +1 -1
- streamlit/web/server/app_static_file_handler.py +1 -1
- streamlit/web/server/authlib_tornado_integration.py +58 -0
- streamlit/web/server/browser_websocket_handler.py +73 -7
- streamlit/web/server/component_request_handler.py +1 -1
- streamlit/web/server/media_file_handler.py +1 -1
- streamlit/web/server/oauth_authlib_routes.py +176 -0
- streamlit/web/server/oidc_mixin.py +108 -0
- streamlit/web/server/routes.py +6 -4
- streamlit/web/server/server.py +41 -4
- streamlit/web/server/server_util.py +25 -1
- streamlit/web/server/stats_request_handler.py +1 -1
- streamlit/web/server/upload_file_request_handler.py +3 -2
- streamlit/web/server/websocket_headers.py +1 -1
- {streamlit_nightly-1.41.2.dev20241227.data → streamlit_nightly-1.41.2.dev20250124.data}/scripts/streamlit.cmd +1 -1
- {streamlit_nightly-1.41.2.dev20241227.dist-info → streamlit_nightly-1.41.2.dev20250124.dist-info}/METADATA +16 -4
- streamlit_nightly-1.41.2.dev20250124.dist-info/RECORD +560 -0
- {streamlit_nightly-1.41.2.dev20241227.dist-info → streamlit_nightly-1.41.2.dev20250124.dist-info}/WHEEL +1 -1
- streamlit/static/static/css/index.ZIJkhegp.css +0 -1
- streamlit/static/static/js/InputInstructions.DpTmOmkP.js +0 -1
- streamlit/static/static/js/RenderInPortalIfExists.CphMKHZ_.js +0 -1
- streamlit/static/static/js/Toolbar.YZjXpW2P.js +0 -1
- streamlit/static/static/js/_commonjs-dynamic-modules.TDtrdbi3.js +0 -1
- streamlit/static/static/js/createSuper.Cj3WfXha.js +0 -1
- streamlit/static/static/js/data-grid-overlay-editor.CXW3Vrt9.js +0 -1
- streamlit/static/static/js/getPrototypeOf.BZAK2f3t.js +0 -1
- streamlit/static/static/js/index.1auHKWgw.js +0 -3
- streamlit/static/static/js/index.2XFKVtzu.js +0 -1
- streamlit/static/static/js/index.B9O1l5Yf.js +0 -32
- streamlit/static/static/js/index.BjtDBCFh.js +0 -2
- streamlit/static/static/js/index.Bp-uIPRI.js +0 -1
- streamlit/static/static/js/index.BrGYP4fV.js +0 -1
- streamlit/static/static/js/index.BwUmNKlx.js +0 -1
- streamlit/static/static/js/index.CCVCD0op.js +0 -1
- streamlit/static/static/js/index.CP7C0jmi.js +0 -1
- streamlit/static/static/js/index.CVNaQiWI.js +0 -4
- streamlit/static/static/js/index.CX7qwffH.js +0 -1
- streamlit/static/static/js/index.CaCnIXu_.js +0 -1
- streamlit/static/static/js/index.Ck6XWYeb.js +0 -1
- streamlit/static/static/js/index.CmD2DSvp.js +0 -201
- streamlit/static/static/js/index.CnX4MRBV.js +0 -1
- streamlit/static/static/js/index.DR8k91Kp.js +0 -1
- streamlit/static/static/js/index.Dc0EFNHf.js +0 -197
- streamlit/static/static/js/index.M9USxdKN.js +0 -1
- streamlit/static/static/js/index.MCDV8ab_.js +0 -1
- streamlit/static/static/js/index.T4c5nSGV.js +0 -2
- streamlit/static/static/js/index.brVZtr01.js +0 -1
- streamlit/static/static/js/index.fm1fEqFi.js +0 -1
- streamlit/static/static/js/index.vm3Bds7I.js +0 -1
- streamlit/static/static/js/index.y_EIxzAg.js +0 -1
- streamlit/static/static/js/number-overlay-editor.D5dgP2YW.js +0 -9
- streamlit/static/static/js/slicedToArray.DVgs1NsC.js +0 -2
- streamlit/static/static/js/string.Bl9OLDCw.js +0 -1
- streamlit/static/static/js/threshold.skajmqVB.js +0 -1
- streamlit/static/static/js/timer.DwZfkapc.js +0 -1
- streamlit/static/static/js/uniqueId.OJw6SDpp.js +0 -1
- streamlit/static/static/js/withFullScreenWrapper.BjS0eA06.js +0 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.MYSe4dsi.woff2 +0 -0
- streamlit/vendor/ipython/__init__.py +0 -0
- streamlit/vendor/ipython/modified_sys_path.py +0 -67
- streamlit_nightly-1.41.2.dev20241227.dist-info/RECORD +0 -556
- /streamlit/static/static/css/{index.B26BQfSF.css → index.Bmkmz40k.css} +0 -0
- /streamlit/static/static/css/{index.CG16XVnL.css → index.DzuxGC_t.css} +0 -0
- {streamlit_nightly-1.41.2.dev20241227.dist-info → streamlit_nightly-1.41.2.dev20250124.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.41.2.dev20241227.dist-info → streamlit_nightly-1.41.2.dev20250124.dist-info}/top_level.txt +0 -0
streamlit/runtime/credentials.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -199,8 +199,8 @@ class Credentials:
|
|
199
199
|
|
200
200
|
try:
|
201
201
|
os.remove(c._conf_file)
|
202
|
-
except OSError
|
203
|
-
_LOGGER.
|
202
|
+
except OSError:
|
203
|
+
_LOGGER.exception("Error removing credentials file.")
|
204
204
|
|
205
205
|
def save(self) -> None:
|
206
206
|
"""Save to toml file and send email."""
|
@@ -222,8 +222,8 @@ class Credentials:
|
|
222
222
|
|
223
223
|
try:
|
224
224
|
_send_email(self.activation.email)
|
225
|
-
except RequestException
|
226
|
-
_LOGGER.
|
225
|
+
except RequestException:
|
226
|
+
_LOGGER.exception("Error saving email:")
|
227
227
|
|
228
228
|
def activate(self, show_instructions: bool = True) -> None:
|
229
229
|
"""Activate Streamlit.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -133,7 +133,9 @@ class ForwardMsgCache(CacheStatsProvider):
|
|
133
133
|
if script_run_count < prev_run_count:
|
134
134
|
_LOGGER.error(
|
135
135
|
"New script_run_count (%s) is < prev_run_count (%s). "
|
136
|
-
"This should never happen!"
|
136
|
+
"This should never happen!",
|
137
|
+
script_run_count,
|
138
|
+
prev_run_count,
|
137
139
|
)
|
138
140
|
script_run_count = prev_run_count
|
139
141
|
self._session_script_run_counts[session] = script_run_count
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
|
-
from typing import TYPE_CHECKING, Any
|
17
|
+
from typing import TYPE_CHECKING, Any, Callable
|
18
18
|
|
19
19
|
from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
|
20
20
|
|
@@ -33,6 +33,16 @@ class ForwardMsgQueue:
|
|
33
33
|
a single thread.
|
34
34
|
"""
|
35
35
|
|
36
|
+
_before_enqueue_msg: Callable[[ForwardMsg], None] | None = None
|
37
|
+
|
38
|
+
@staticmethod
|
39
|
+
def on_before_enqueue_msg(
|
40
|
+
before_enqueue_msg: Callable[[ForwardMsg], None] | None,
|
41
|
+
) -> None:
|
42
|
+
"""Set a callback to be called before a message is enqueued.
|
43
|
+
Used in static streamlit app generation."""
|
44
|
+
ForwardMsgQueue._before_enqueue_msg = before_enqueue_msg
|
45
|
+
|
36
46
|
def __init__(self):
|
37
47
|
self._queue: list[ForwardMsg] = []
|
38
48
|
# A mapping of (delta_path -> _queue.indexof(msg)) for each
|
@@ -55,6 +65,10 @@ class ForwardMsgQueue:
|
|
55
65
|
|
56
66
|
def enqueue(self, msg: ForwardMsg) -> None:
|
57
67
|
"""Add message into queue, possibly composing it with another message."""
|
68
|
+
|
69
|
+
if ForwardMsgQueue._before_enqueue_msg:
|
70
|
+
ForwardMsgQueue._before_enqueue_msg(msg)
|
71
|
+
|
58
72
|
if not _is_composable_message(msg):
|
59
73
|
self._queue.append(msg)
|
60
74
|
return
|
@@ -103,7 +117,7 @@ class ForwardMsgQueue:
|
|
103
117
|
self._queue = []
|
104
118
|
else:
|
105
119
|
self._queue = [
|
106
|
-
_update_script_finished_message(msg)
|
120
|
+
_update_script_finished_message(msg, fragment_ids_this_run is not None)
|
107
121
|
for msg in self._queue
|
108
122
|
if msg.WhichOneof("type")
|
109
123
|
in {
|
@@ -195,7 +209,9 @@ def _maybe_compose_deltas(old_delta: Delta, new_delta: Delta) -> Delta | None:
|
|
195
209
|
return None
|
196
210
|
|
197
211
|
|
198
|
-
def _update_script_finished_message(
|
212
|
+
def _update_script_finished_message(
|
213
|
+
msg: ForwardMsg, is_fragment_run: bool
|
214
|
+
) -> ForwardMsg:
|
199
215
|
"""
|
200
216
|
When we are here, the message queue is cleared from non-lifecycle messages
|
201
217
|
before they were flushed to the browser.
|
@@ -207,6 +223,18 @@ def _update_script_finished_message(msg: ForwardMsg) -> ForwardMsg:
|
|
207
223
|
Otherwise, a `FINISHED_SUCCESSFULLY` message might trigger a reset of widget
|
208
224
|
states on the frontend.
|
209
225
|
"""
|
210
|
-
if msg.WhichOneof("type") == "script_finished"
|
226
|
+
if msg.WhichOneof("type") == "script_finished" and (
|
227
|
+
# If this is not a fragment run (= full app run), its okay to change the
|
228
|
+
# script_finished type to FINISHED_EARLY_FOR_RERUN because another full app run
|
229
|
+
# is about to start.
|
230
|
+
# If this is a fragment run, it is allowed to change the state of
|
231
|
+
# all script_finished states except for FINISHED_SUCCESSFULLY, which we use to
|
232
|
+
# indicate that a full app run has finished successfully (in other words, a
|
233
|
+
# fragment should not modify the finished status of a full app run, because
|
234
|
+
# the fragment finished state is different and the frontend might not trigger
|
235
|
+
# cleanups etc. correctly).
|
236
|
+
is_fragment_run is False
|
237
|
+
or msg.script_finished != ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY
|
238
|
+
):
|
211
239
|
msg.script_finished = ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN
|
212
240
|
return msg
|
streamlit/runtime/fragment.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -97,7 +97,7 @@ class MemoryFragmentStorage(FragmentStorage):
|
|
97
97
|
the FragmentStorage protocol.
|
98
98
|
"""
|
99
99
|
|
100
|
-
def __init__(self):
|
100
|
+
def __init__(self) -> None:
|
101
101
|
self._fragments: dict[str, Fragment] = {}
|
102
102
|
|
103
103
|
# Weirdly, we have to define this above the `set` method, or mypy gets it confused
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -152,6 +152,7 @@ _ATTRIBUTIONS_TO_CHECK: Final = [
|
|
152
152
|
"streamlit_pydantic",
|
153
153
|
"pydantic",
|
154
154
|
"plost",
|
155
|
+
"authlib",
|
155
156
|
]
|
156
157
|
|
157
158
|
_ETC_MACHINE_ID_PATH = "/etc/machine-id"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -300,7 +300,9 @@ class PagesManager:
|
|
300
300
|
if isinstance(self.pages_strategy, PagesStrategyV1):
|
301
301
|
if os.path.exists(self.main_script_parent / "pages"):
|
302
302
|
_LOGGER.warning(
|
303
|
-
"st.navigation was called in an app with a pages/ directory.
|
303
|
+
"st.navigation was called in an app with a pages/ directory. "
|
304
|
+
"This may cause unusual app behavior. You may want to rename the "
|
305
|
+
"pages/ directory."
|
304
306
|
)
|
305
307
|
PagesManager.DefaultStrategy = PagesStrategyV2
|
306
308
|
self.pages_strategy = PagesStrategyV2(self)
|
streamlit/runtime/runtime.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -273,6 +273,17 @@ class Runtime:
|
|
273
273
|
return None
|
274
274
|
return session_info.client
|
275
275
|
|
276
|
+
def clear_user_info_for_session(self, session_id: str) -> None:
|
277
|
+
"""Clear the user_info for the given session_id.
|
278
|
+
|
279
|
+
Notes
|
280
|
+
-----
|
281
|
+
Threading: SAFE. May be called on any thread.
|
282
|
+
"""
|
283
|
+
session_info = self._session_mgr.get_session_info(session_id)
|
284
|
+
if session_info is not None:
|
285
|
+
session_info.session.clear_user_info()
|
286
|
+
|
276
287
|
async def start(self) -> None:
|
277
288
|
"""Start the runtime. This must be called only once, before
|
278
289
|
any other functions are called.
|
@@ -335,7 +346,7 @@ class Runtime:
|
|
335
346
|
def connect_session(
|
336
347
|
self,
|
337
348
|
client: SessionClient,
|
338
|
-
user_info: dict[str, str | None],
|
349
|
+
user_info: dict[str, str | bool | None],
|
339
350
|
existing_session_id: str | None = None,
|
340
351
|
session_id_override: str | None = None,
|
341
352
|
) -> str:
|
@@ -396,7 +407,7 @@ class Runtime:
|
|
396
407
|
def create_session(
|
397
408
|
self,
|
398
409
|
client: SessionClient,
|
399
|
-
user_info: dict[str, str | None],
|
410
|
+
user_info: dict[str, str | bool | None],
|
400
411
|
existing_session_id: str | None = None,
|
401
412
|
session_id_override: str | None = None,
|
402
413
|
) -> str:
|
@@ -724,9 +735,14 @@ Please report this bug at https://github.com/streamlit/streamlit/issues.
|
|
724
735
|
|
725
736
|
# If this was a `script_finished` message, we increment the
|
726
737
|
# script_run_count for this session, and update the cache
|
727
|
-
if (
|
728
|
-
msg.
|
729
|
-
|
738
|
+
if msg.WhichOneof("type") == "script_finished" and (
|
739
|
+
msg.script_finished == ForwardMsg.FINISHED_SUCCESSFULLY
|
740
|
+
or (
|
741
|
+
config.get_option(
|
742
|
+
"global.includeFragmentRunsInForwardMessageCacheCount"
|
743
|
+
)
|
744
|
+
and msg.script_finished == ForwardMsg.FINISHED_FRAGMENT_RUN_SUCCESSFULLY
|
745
|
+
)
|
730
746
|
):
|
731
747
|
_LOGGER.debug(
|
732
748
|
"Script run finished successfully; "
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
streamlit/runtime/script_data.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -14,8 +14,10 @@
|
|
14
14
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
|
+
import sys
|
17
18
|
from typing import TYPE_CHECKING, Any, Callable
|
18
19
|
|
20
|
+
from streamlit import util
|
19
21
|
from streamlit.delta_generator_singletons import (
|
20
22
|
context_dg_stack,
|
21
23
|
get_default_dg_stack_value,
|
@@ -32,6 +34,37 @@ if TYPE_CHECKING:
|
|
32
34
|
from streamlit.runtime.scriptrunner_utils.script_run_context import ScriptRunContext
|
33
35
|
|
34
36
|
|
37
|
+
class modified_sys_path:
|
38
|
+
"""A context for prepending a directory to sys.path for a second.
|
39
|
+
|
40
|
+
Code inspired by IPython:
|
41
|
+
Source: https://github.com/ipython/ipython/blob/master/IPython/utils/syspathcontext.py#L42
|
42
|
+
"""
|
43
|
+
|
44
|
+
def __init__(self, main_script_path: str):
|
45
|
+
self._main_script_path = main_script_path
|
46
|
+
self._added_path = False
|
47
|
+
|
48
|
+
def __repr__(self) -> str:
|
49
|
+
return util.repr_(self)
|
50
|
+
|
51
|
+
def __enter__(self):
|
52
|
+
if self._main_script_path not in sys.path:
|
53
|
+
sys.path.insert(0, self._main_script_path)
|
54
|
+
self._added_path = True
|
55
|
+
|
56
|
+
def __exit__(self, type, value, traceback):
|
57
|
+
if self._added_path:
|
58
|
+
try:
|
59
|
+
sys.path.remove(self._main_script_path)
|
60
|
+
except ValueError:
|
61
|
+
# It's already removed.
|
62
|
+
pass
|
63
|
+
|
64
|
+
# Returning False causes any exceptions to be re-raised.
|
65
|
+
return False
|
66
|
+
|
67
|
+
|
35
68
|
def exec_func_with_error_handling(
|
36
69
|
func: Callable[[], Any], ctx: ScriptRunContext
|
37
70
|
) -> tuple[
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -34,7 +34,10 @@ from streamlit.runtime.metrics_util import (
|
|
34
34
|
create_page_profile_message,
|
35
35
|
to_microseconds,
|
36
36
|
)
|
37
|
-
from streamlit.runtime.scriptrunner.exec_code import
|
37
|
+
from streamlit.runtime.scriptrunner.exec_code import (
|
38
|
+
exec_func_with_error_handling,
|
39
|
+
modified_sys_path,
|
40
|
+
)
|
38
41
|
from streamlit.runtime.scriptrunner.script_cache import ScriptCache
|
39
42
|
from streamlit.runtime.scriptrunner_utils.exceptions import (
|
40
43
|
RerunException,
|
@@ -55,7 +58,6 @@ from streamlit.runtime.state import (
|
|
55
58
|
SafeSessionState,
|
56
59
|
SessionState,
|
57
60
|
)
|
58
|
-
from streamlit.vendor.ipython.modified_sys_path import modified_sys_path
|
59
61
|
|
60
62
|
if TYPE_CHECKING:
|
61
63
|
from streamlit.runtime.fragment import FragmentStorage
|
@@ -123,7 +125,7 @@ class ScriptRunner:
|
|
123
125
|
uploaded_file_mgr: UploadedFileManager,
|
124
126
|
script_cache: ScriptCache,
|
125
127
|
initial_rerun_data: RerunData,
|
126
|
-
user_info: dict[str, str | None],
|
128
|
+
user_info: dict[str, str | bool | None],
|
127
129
|
fragment_storage: FragmentStorage,
|
128
130
|
pages_manager: PagesManager,
|
129
131
|
):
|
@@ -501,7 +503,7 @@ class ScriptRunner:
|
|
501
503
|
|
502
504
|
except Exception as ex:
|
503
505
|
# We got a compile error. Send an error event and bail immediately.
|
504
|
-
_LOGGER.debug("Fatal script error
|
506
|
+
_LOGGER.debug("Fatal script error", exc_info=ex)
|
505
507
|
self._session_state[SCRIPT_RUN_WITHOUT_ERRORS_KEY] = False
|
506
508
|
self.on_event.send(
|
507
509
|
self,
|
@@ -553,15 +555,24 @@ class ScriptRunner:
|
|
553
555
|
wrapped_fragment()
|
554
556
|
|
555
557
|
except FragmentStorageKeyError:
|
556
|
-
#
|
557
|
-
#
|
558
|
-
#
|
559
|
-
#
|
560
|
-
#
|
558
|
+
# This can happen if the fragment_id is removed from the
|
559
|
+
# storage before the script runner gets to it. In this
|
560
|
+
# case, the fragment is simply skipped.
|
561
|
+
# Also, only log an error if the fragment is not an
|
562
|
+
# auto_rerun to avoid noise. If it is an auto_rerun, we
|
563
|
+
# might have a race condition where the fragment_id is
|
564
|
+
# removed but the webapp sends a rerun request before
|
565
|
+
# the removal information has reached the web app
|
561
566
|
# (see https://github.com/streamlit/streamlit/issues/9080).
|
562
567
|
if not rerun_data.is_auto_rerun:
|
563
|
-
|
564
|
-
f"
|
568
|
+
_LOGGER.warning(
|
569
|
+
f"Couldn't find fragment with id {fragment_id}."
|
570
|
+
" This can happen if the fragment does not"
|
571
|
+
" exist anymore when this request is processed,"
|
572
|
+
" for example because a full app rerun happened"
|
573
|
+
" that did not register the fragment."
|
574
|
+
" Usually this doesn't happen or no action is"
|
575
|
+
" required, so its mainly for debugging."
|
565
576
|
)
|
566
577
|
except (RerunException, StopException) as e:
|
567
578
|
# The wrapped_fragment function is executed
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -52,6 +52,7 @@ class RerunData:
|
|
52
52
|
# The queue of fragment_ids waiting to be run.
|
53
53
|
fragment_id_queue: list[str] = field(default_factory=list)
|
54
54
|
is_fragment_scoped_rerun: bool = False
|
55
|
+
# set to true when a script is rerun by the fragment auto-rerun mechanism
|
55
56
|
is_auto_rerun: bool = False
|
56
57
|
|
57
58
|
def __repr__(self) -> str:
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -51,7 +51,7 @@ if TYPE_CHECKING:
|
|
51
51
|
from streamlit.runtime.uploaded_file_manager import UploadedFileManager
|
52
52
|
_LOGGER: Final = get_logger(__name__)
|
53
53
|
|
54
|
-
UserInfo: TypeAlias = Dict[str, Union[str, None]]
|
54
|
+
UserInfo: TypeAlias = Dict[str, Union[str, bool, None]]
|
55
55
|
|
56
56
|
|
57
57
|
# If true, it indicates that we are in a cached function that disallows the usage of
|
streamlit/runtime/secrets.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -236,7 +236,7 @@ class SessionManager(Protocol):
|
|
236
236
|
self,
|
237
237
|
client: SessionClient,
|
238
238
|
script_data: ScriptData,
|
239
|
-
user_info: dict[str, str | None],
|
239
|
+
user_info: dict[str, str | bool | None],
|
240
240
|
existing_session_id: str | None = None,
|
241
241
|
session_id_override: str | None = None,
|
242
242
|
) -> str:
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -201,4 +201,4 @@ class QueryParams(MutableMapping[str, str]):
|
|
201
201
|
|
202
202
|
|
203
203
|
def missing_key_error_message(key: str) -> str:
|
204
|
-
return f'st.query_params has no key "{key}".
|
204
|
+
return f'st.query_params has no key "{key}".'
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -17,7 +17,6 @@ from __future__ import annotations
|
|
17
17
|
from typing import TYPE_CHECKING, Iterable, Iterator, MutableMapping, overload
|
18
18
|
|
19
19
|
from streamlit.runtime.metrics_util import gather_metrics
|
20
|
-
from streamlit.runtime.state.query_params import missing_key_error_message
|
21
20
|
from streamlit.runtime.state.session_state_proxy import get_session_state
|
22
21
|
|
23
22
|
if TYPE_CHECKING:
|
@@ -45,7 +44,10 @@ class QueryParamsProxy(MutableMapping[str, str]):
|
|
45
44
|
@gather_metrics("query_params.get_item")
|
46
45
|
def __getitem__(self, key: str) -> str:
|
47
46
|
with get_session_state().query_params() as qp:
|
48
|
-
|
47
|
+
try:
|
48
|
+
return qp[key]
|
49
|
+
except KeyError:
|
50
|
+
raise KeyError(self.missing_key_error_message(key))
|
49
51
|
|
50
52
|
def __delitem__(self, key: str) -> None:
|
51
53
|
with get_session_state().query_params() as qp:
|
@@ -62,14 +64,14 @@ class QueryParamsProxy(MutableMapping[str, str]):
|
|
62
64
|
try:
|
63
65
|
return qp[key]
|
64
66
|
except KeyError:
|
65
|
-
raise AttributeError(
|
67
|
+
raise AttributeError(self.missing_attr_error_message(key))
|
66
68
|
|
67
69
|
def __delattr__(self, key: str) -> None:
|
68
70
|
with get_session_state().query_params() as qp:
|
69
71
|
try:
|
70
72
|
del qp[key]
|
71
73
|
except KeyError:
|
72
|
-
raise AttributeError(missing_key_error_message(key))
|
74
|
+
raise AttributeError(self.missing_key_error_message(key))
|
73
75
|
|
74
76
|
@overload
|
75
77
|
def update(
|
@@ -205,3 +207,11 @@ class QueryParamsProxy(MutableMapping[str, str]):
|
|
205
207
|
"""
|
206
208
|
with get_session_state().query_params() as qp:
|
207
209
|
return qp.from_dict(params)
|
210
|
+
|
211
|
+
@staticmethod
|
212
|
+
def missing_key_error_message(key: str) -> str:
|
213
|
+
return f'st.query_params has no key "{key}".'
|
214
|
+
|
215
|
+
@staticmethod
|
216
|
+
def missing_attr_error_message(key: str) -> str:
|
217
|
+
return f'st.query_params has no attribute "{key}".'
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
streamlit/runtime/stats.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|