streamlit 1.53.0__py3-none-any.whl → 1.54.0__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.
Files changed (311) hide show
  1. streamlit/__init__.py +1 -31
  2. streamlit/auth_util.py +91 -2
  3. streamlit/cli_util.py +3 -2
  4. streamlit/commands/echo.py +2 -2
  5. streamlit/commands/execution_control.py +1 -1
  6. streamlit/commands/logo.py +76 -24
  7. streamlit/commands/navigation.py +1 -1
  8. streamlit/components/types/base_custom_component.py +0 -2
  9. streamlit/components/v1/custom_component.py +0 -2
  10. streamlit/components/v2/bidi_component/main.py +2 -2
  11. streamlit/components/v2/component_path_utils.py +17 -29
  12. streamlit/components/v2/manifest_scanner.py +8 -3
  13. streamlit/components/v2/presentation.py +1 -1
  14. streamlit/config.py +57 -13
  15. streamlit/config_util.py +5 -5
  16. streamlit/connections/snowflake_connection.py +6 -3
  17. streamlit/dataframe_util.py +10 -10
  18. streamlit/deprecation_util.py +19 -1
  19. streamlit/elements/arrow.py +18 -8
  20. streamlit/elements/deck_gl_json_chart.py +6 -2
  21. streamlit/elements/exception.py +4 -2
  22. streamlit/elements/form.py +1 -1
  23. streamlit/elements/layouts.py +1 -1
  24. streamlit/elements/lib/built_in_chart_utils.py +36 -13
  25. streamlit/elements/lib/color_util.py +21 -2
  26. streamlit/elements/lib/column_config_utils.py +9 -7
  27. streamlit/elements/lib/dialog.py +1 -1
  28. streamlit/elements/lib/image_utils.py +5 -5
  29. streamlit/elements/lib/layout_utils.py +1 -1
  30. streamlit/elements/lib/options_selector_utils.py +112 -18
  31. streamlit/elements/lib/policies.py +1 -1
  32. streamlit/elements/lib/streamlit_plotly_theme.py +9 -11
  33. streamlit/elements/lib/utils.py +1 -1
  34. streamlit/elements/map.py +6 -6
  35. streamlit/elements/plotly_chart.py +2 -2
  36. streamlit/elements/toast.py +1 -1
  37. streamlit/elements/vega_charts.py +30 -7
  38. streamlit/elements/widgets/button.py +3 -3
  39. streamlit/elements/widgets/button_group.py +3 -3
  40. streamlit/elements/widgets/chat.py +1 -1
  41. streamlit/elements/widgets/data_editor.py +6 -6
  42. streamlit/elements/widgets/multiselect.py +32 -8
  43. streamlit/elements/widgets/number_input.py +1 -1
  44. streamlit/elements/widgets/radio.py +91 -31
  45. streamlit/elements/widgets/select_slider.py +123 -37
  46. streamlit/elements/widgets/selectbox.py +38 -16
  47. streamlit/elements/widgets/slider.py +5 -5
  48. streamlit/elements/widgets/time_widgets.py +150 -18
  49. streamlit/elements/write.py +2 -3
  50. streamlit/env_util.py +1 -1
  51. streamlit/errors.py +2 -14
  52. streamlit/external/langchain/streamlit_callback_handler.py +1 -1
  53. streamlit/hello/dataframe_demo.py +1 -1
  54. streamlit/hello/plotting_demo.py +19 -12
  55. streamlit/path_security.py +98 -0
  56. streamlit/proto/Alert_pb2.py +2 -3
  57. streamlit/proto/AppPage_pb2.py +2 -3
  58. streamlit/proto/ArrowData_pb2.py +2 -3
  59. streamlit/proto/ArrowNamedDataSet_pb2.py +2 -3
  60. streamlit/proto/ArrowVegaLiteChart_pb2.py +2 -3
  61. streamlit/proto/Arrow_pb2.py +2 -3
  62. streamlit/proto/AudioInput_pb2.py +2 -3
  63. streamlit/proto/Audio_pb2.py +2 -3
  64. streamlit/proto/AuthRedirect_pb2.py +2 -3
  65. streamlit/proto/AutoRerun_pb2.py +2 -3
  66. streamlit/proto/BackMsg_pb2.py +2 -3
  67. streamlit/proto/Balloons_pb2.py +2 -3
  68. streamlit/proto/BidiComponent_pb2.py +2 -3
  69. streamlit/proto/Block_pb2.py +2 -3
  70. streamlit/proto/BokehChart_pb2.py +2 -3
  71. streamlit/proto/ButtonGroup_pb2.py +2 -3
  72. streamlit/proto/ButtonLikeIconPosition_pb2.py +2 -3
  73. streamlit/proto/Button_pb2.py +2 -3
  74. streamlit/proto/CameraInput_pb2.py +2 -3
  75. streamlit/proto/ChatInput_pb2.py +2 -3
  76. streamlit/proto/Checkbox_pb2.py +2 -3
  77. streamlit/proto/ClientState_pb2.py +2 -3
  78. streamlit/proto/Code_pb2.py +2 -3
  79. streamlit/proto/ColorPicker_pb2.py +2 -3
  80. streamlit/proto/Common_pb2.py +2 -3
  81. streamlit/proto/Components_pb2.py +2 -3
  82. streamlit/proto/DataFrame_pb2.py +2 -3
  83. streamlit/proto/DateInput_pb2.py +2 -3
  84. streamlit/proto/DateTimeInput_pb2.py +2 -3
  85. streamlit/proto/DeckGlJsonChart_pb2.py +2 -3
  86. streamlit/proto/Delta_pb2.py +2 -3
  87. streamlit/proto/DocString_pb2.py +2 -3
  88. streamlit/proto/DownloadButton_pb2.py +2 -3
  89. streamlit/proto/Element_pb2.py +2 -3
  90. streamlit/proto/Empty_pb2.py +2 -3
  91. streamlit/proto/Exception_pb2.py +2 -3
  92. streamlit/proto/Favicon_pb2.py +2 -3
  93. streamlit/proto/FileUploader_pb2.py +2 -3
  94. streamlit/proto/ForwardMsg_pb2.py +2 -3
  95. streamlit/proto/GapSize_pb2.py +2 -3
  96. streamlit/proto/GitInfo_pb2.py +2 -3
  97. streamlit/proto/GraphVizChart_pb2.py +2 -3
  98. streamlit/proto/Heading_pb2.py +2 -3
  99. streamlit/proto/HeightConfig_pb2.py +2 -3
  100. streamlit/proto/Html_pb2.py +2 -3
  101. streamlit/proto/IFrame_pb2.py +2 -3
  102. streamlit/proto/Image_pb2.py +2 -3
  103. streamlit/proto/Json_pb2.py +2 -3
  104. streamlit/proto/LabelVisibilityMessage_pb2.py +2 -3
  105. streamlit/proto/LinkButton_pb2.py +2 -3
  106. streamlit/proto/Logo_pb2.py +6 -5
  107. streamlit/proto/Logo_pb2.pyi +25 -1
  108. streamlit/proto/Markdown_pb2.py +2 -3
  109. streamlit/proto/Metric_pb2.py +2 -3
  110. streamlit/proto/MetricsEvent_pb2.py +2 -3
  111. streamlit/proto/MultiSelect_pb2.py +2 -3
  112. streamlit/proto/NamedDataSet_pb2.py +2 -3
  113. streamlit/proto/Navigation_pb2.py +2 -3
  114. streamlit/proto/NewSession_pb2.py +25 -24
  115. streamlit/proto/NewSession_pb2.pyi +28 -2
  116. streamlit/proto/NumberInput_pb2.py +2 -3
  117. streamlit/proto/PageConfig_pb2.py +2 -3
  118. streamlit/proto/PageInfo_pb2.py +2 -3
  119. streamlit/proto/PageLink_pb2.py +2 -3
  120. streamlit/proto/PageNotFound_pb2.py +2 -3
  121. streamlit/proto/PageProfile_pb2.py +2 -3
  122. streamlit/proto/PagesChanged_pb2.py +2 -3
  123. streamlit/proto/ParentMessage_pb2.py +2 -3
  124. streamlit/proto/PlotlyChart_pb2.py +2 -3
  125. streamlit/proto/Progress_pb2.py +2 -3
  126. streamlit/proto/Radio_pb2.py +5 -4
  127. streamlit/proto/Radio_pb2.pyi +20 -3
  128. streamlit/proto/RootContainer_pb2.py +2 -3
  129. streamlit/proto/Selectbox_pb2.py +2 -3
  130. streamlit/proto/SessionEvent_pb2.py +2 -3
  131. streamlit/proto/SessionStatus_pb2.py +2 -3
  132. streamlit/proto/Skeleton_pb2.py +2 -3
  133. streamlit/proto/Slider_pb2.py +7 -8
  134. streamlit/proto/Slider_pb2.pyi +9 -1
  135. streamlit/proto/Snow_pb2.py +2 -3
  136. streamlit/proto/Space_pb2.py +2 -3
  137. streamlit/proto/Spinner_pb2.py +2 -3
  138. streamlit/proto/TextAlignmentConfig_pb2.py +2 -3
  139. streamlit/proto/TextArea_pb2.py +2 -3
  140. streamlit/proto/TextInput_pb2.py +2 -3
  141. streamlit/proto/Text_pb2.py +2 -3
  142. streamlit/proto/TimeInput_pb2.py +2 -3
  143. streamlit/proto/Toast_pb2.py +2 -3
  144. streamlit/proto/Transient_pb2.py +2 -3
  145. streamlit/proto/VegaLiteChart_pb2.py +2 -3
  146. streamlit/proto/Video_pb2.py +2 -3
  147. streamlit/proto/WidgetStates_pb2.py +2 -3
  148. streamlit/proto/WidthConfig_pb2.py +2 -3
  149. streamlit/proto/openmetrics_data_model_pb2.py +2 -3
  150. streamlit/runtime/app_session.py +106 -60
  151. streamlit/runtime/caching/cache_data_api.py +3 -3
  152. streamlit/runtime/caching/cache_errors.py +0 -2
  153. streamlit/runtime/caching/cache_resource_api.py +1 -1
  154. streamlit/runtime/caching/cache_utils.py +2 -2
  155. streamlit/runtime/caching/hashing.py +1 -3
  156. streamlit/runtime/caching/storage/cache_storage_protocol.py +0 -3
  157. streamlit/runtime/connection_factory.py +1 -1
  158. streamlit/runtime/credentials.py +2 -2
  159. streamlit/runtime/metrics_util.py +3 -3
  160. streamlit/runtime/runtime.py +6 -6
  161. streamlit/runtime/scriptrunner/script_runner.py +17 -0
  162. streamlit/runtime/scriptrunner_utils/exceptions.py +0 -4
  163. streamlit/runtime/scriptrunner_utils/script_run_context.py +13 -31
  164. streamlit/runtime/secrets.py +3 -4
  165. streamlit/runtime/state/__init__.py +7 -1
  166. streamlit/runtime/state/common.py +13 -0
  167. streamlit/runtime/state/query_params.py +493 -24
  168. streamlit/runtime/state/session_state.py +179 -4
  169. streamlit/runtime/state/widgets.py +26 -1
  170. streamlit/runtime/stats.py +1 -10
  171. streamlit/static/index.html +1 -1
  172. streamlit/static/manifest.json +304 -304
  173. streamlit/static/static/js/{ErrorOutline.esm.Cxoit62D.js → ErrorOutline.esm.BWk6F-Tz.js} +1 -1
  174. streamlit/static/static/js/{FileDownload.esm.Cym2KVOR.js → FileDownload.esm.AllYUuOW.js} +1 -1
  175. streamlit/static/static/js/{FileHelper.C47VLeXF.js → FileHelper.BvVTNdmy.js} +1 -1
  176. streamlit/static/static/js/{FormClearHelper.CUrwwEeX.js → FormClearHelper.C__r5Llk.js} +1 -1
  177. streamlit/static/static/js/{InputInstructions.DyVOE42q.js → InputInstructions.DOtkdOMV.js} +1 -1
  178. streamlit/static/static/js/Particles.DCsqQZlE.js +1 -0
  179. streamlit/static/static/js/{ProgressBar.qKdiDYyx.js → ProgressBar.DLCRvt4m.js} +2 -2
  180. streamlit/static/static/js/{StreamlitSyntaxHighlighter.DUPp9dS3.js → StreamlitSyntaxHighlighter.CYFWoZHb.js} +1 -1
  181. streamlit/static/static/js/{TableChart.esm.C_g2CvCE.js → TableChart.esm.D6ydHcIm.js} +1 -1
  182. streamlit/static/static/js/Toolbar.BHDNzWBx.js +1 -0
  183. streamlit/static/static/js/{WidgetLabelHelpIconInline.Dy4yV6I2.js → WidgetLabelHelpIconInline.DEXBrVlc.js} +1 -1
  184. streamlit/static/static/js/{base-input.DQAb60v0.js → base-input.TSQjctlq.js} +4 -4
  185. streamlit/static/static/js/{checkbox.C0HE0ojW.js → checkbox.BKgfzJZV.js} +1 -1
  186. streamlit/static/static/js/{createDownloadLinkElement.DBMfH8_e.js → createDownloadLinkElement.CG7nr2a4.js} +1 -1
  187. streamlit/static/static/js/{data-grid-overlay-editor.CSZWem5Q.js → data-grid-overlay-editor.ChXO__lP.js} +1 -1
  188. streamlit/static/static/js/{downloader.Bp8c7mYD.js → downloader.DJ3R_zWA.js} +1 -1
  189. streamlit/static/static/js/embed.u3PPfLkw.js +193 -0
  190. streamlit/static/static/js/{es6.j7akTCaI.js → es6.C5Mfy8nd.js} +2 -2
  191. streamlit/static/static/js/{formatNumber.CfuUiEpF.js → formatNumber.CMRgW9EJ.js} +1 -1
  192. streamlit/static/static/js/{iconPosition.BVSTKfGd.js → iconPosition.B4EEXI3E.js} +1 -1
  193. streamlit/static/static/js/{iframeResizer.contentWindow.BZ3lugzo.js → iframeResizer.contentWindow.WSvOiTW0.js} +1 -1
  194. streamlit/static/static/js/index.-FOBV3nz.js +1 -0
  195. streamlit/static/static/js/{index.D0tXFTaW.js → index.-NF8OSF5.js} +1 -1
  196. streamlit/static/static/js/{index.Dk0CU4R6.js → index.4cBg8kn5.js} +1 -1
  197. streamlit/static/static/js/{index.DtZTtufl.js → index.B0pzzCsH.js} +1 -1
  198. streamlit/static/static/js/{index.DSaE74nc.js → index.BID6ND5j.js} +2 -2
  199. streamlit/static/static/js/index.BMp5bGjh.js +1 -0
  200. streamlit/static/static/js/{index.CAMxgVFm.js → index.BQcmlvas.js} +1 -1
  201. streamlit/static/static/js/{index.C0F0G-wg.js → index.BRcmclgI.js} +1 -1
  202. streamlit/static/static/js/index.BaUZR4IG.js +1 -0
  203. streamlit/static/static/js/{index.Cow0Hs9V.js → index.BbMJj4PN.js} +1 -1
  204. streamlit/static/static/js/{index.iboGgrkh.js → index.BdCTJtq3.js} +2 -2
  205. streamlit/static/static/js/index.BdETLMuI.js +1 -0
  206. streamlit/static/static/js/index.BnKMWhs1.js +1 -0
  207. streamlit/static/static/js/index.Br1kXwQW.js +2 -0
  208. streamlit/static/static/js/{index.B2fTHpId.js → index.Bt2olRE4.js} +1 -1
  209. streamlit/static/static/js/{index.DBIRzFM7.js → index.Bxwsv5T8.js} +1 -1
  210. streamlit/static/static/js/index.C4KskYz6.js +1 -0
  211. streamlit/static/static/js/{index.BgCYNmov.js → index.C6bmbXk0.js} +1 -1
  212. streamlit/static/static/js/{index.7S_sCSRx.js → index.CEfKfbta.js} +1 -1
  213. streamlit/static/static/js/index.CIuaA8q0.js +2 -0
  214. streamlit/static/static/js/{index.CWAvu1Qu.js → index.CV1sObFX.js} +1 -1
  215. streamlit/static/static/js/{index.C9QftD-S.js → index.CbR6dgaV.js} +1 -1
  216. streamlit/static/static/js/index.Cq6szKqJ.js +1 -0
  217. streamlit/static/static/js/index.CyouXqCz.js +1 -0
  218. streamlit/static/static/js/{index.BMFt07G_.js → index.D1NUgMFI.js} +1 -1
  219. streamlit/static/static/js/{index.Tq2okoAU.js → index.D7SWG4Om.js} +1 -1
  220. streamlit/static/static/js/{index.DgJeIFb5.js → index.DAYPEwLI.js} +1 -1
  221. streamlit/static/static/js/index.DKS75Vfg.js +11 -0
  222. streamlit/static/static/js/{index.FfR9SXQv.js → index.DOXrMIxB.js} +1 -1
  223. streamlit/static/static/js/{index.BiVJWMS-.js → index.DOzYX8yS.js} +3 -3
  224. streamlit/static/static/js/{index.nEa8y_He.js → index.DRFMYcC4.js} +4 -4
  225. streamlit/static/static/js/{index.dgs1TGpP.js → index.Divl5FCY.js} +1 -1
  226. streamlit/static/static/js/{index.95DldRtG.js → index.DjAJ_CUa.js} +1 -1
  227. streamlit/static/static/js/{index.Z0mB4zBp.js → index.Dncue2pm.js} +33 -33
  228. streamlit/static/static/js/{index.DFT9nVK6.js → index.Drusyo5m.js} +48 -48
  229. streamlit/static/static/js/{index.1PD6f3vh.js → index.DuUyDGnP.js} +1 -1
  230. streamlit/static/static/js/{index.DpU0Bc2F.js → index.DvgT2rB2.js} +223 -223
  231. streamlit/static/static/js/{index.Bukztsaz.js → index.DzutABu5.js} +2 -2
  232. streamlit/static/static/js/index.Dzw2iPzi.js +3 -0
  233. streamlit/static/static/js/{index.DYkkO_of.js → index.FsTmxLbT.js} +1 -1
  234. streamlit/static/static/js/{index.CTQ8QcOV.js → index.OIwPqGYN.js} +1 -1
  235. streamlit/static/static/js/{index.NtSfVVJe.js → index.RXLN7YFT.js} +2 -2
  236. streamlit/static/static/js/{index.BU3d_gp1.js → index.YYb2u0jk.js} +2 -2
  237. streamlit/static/static/js/{index.BXfSsjdq.js → index.h8ejt-W3.js} +1 -1
  238. streamlit/static/static/js/{index.gPUFpUqs.js → index.lFMCi9am.js} +1 -1
  239. streamlit/static/static/js/{index.BDA5l7b9.js → index.pOgf4cEj.js} +1 -1
  240. streamlit/static/static/js/index.s_E0s7LB.js +188 -0
  241. streamlit/static/static/js/{index.DysJZEAt.js → index.xLCbzoqj.js} +1 -1
  242. streamlit/static/static/js/{input.Pz8Lwzsi.js → input.BLG7kWaj.js} +2 -2
  243. streamlit/static/static/js/{main.BeiYkHRo.js → main.D_CmqChN.js} +1 -1
  244. streamlit/static/static/js/{memory.Dyx_JBbb.js → memory.T8u9KqIQ.js} +1 -1
  245. streamlit/static/static/js/{number-overlay-editor.NLIdF6b9.js → number-overlay-editor.BKBSXkAM.js} +2 -2
  246. streamlit/static/static/js/{pandasStylerUtils.DsNlDEqS.js → pandasStylerUtils.B4tLYMwS.js} +1 -1
  247. streamlit/static/static/js/{sandbox.bER7qtR1.js → sandbox.jRlkcPem.js} +1 -1
  248. streamlit/static/static/js/{styled-components.DcoFBb7G.js → styled-components.D2QhNwzd.js} +1 -1
  249. streamlit/static/static/js/{throttle.DOaQWO4U.js → throttle.Cyw_V0Dq.js} +1 -1
  250. streamlit/static/static/js/{timepicker.RjHB2IT4.js → timepicker.PzyuDDWl.js} +1 -1
  251. streamlit/static/static/js/{toConsumableArray.DFAIugL0.js → toConsumableArray.gE9fMkLj.js} +1 -1
  252. streamlit/static/static/js/uniqueId.B1GeHnT1.js +1 -0
  253. streamlit/static/static/js/{useBasicWidgetState.CTtyymrp.js → useBasicWidgetState.DFklfao0.js} +1 -1
  254. streamlit/static/static/js/{useIntlLocale.DG5haQGX.js → useIntlLocale.C3tUGWTU.js} +8 -8
  255. streamlit/static/static/js/{useTextInputAutoExpand.Cnfcep1Z.js → useTextInputAutoExpand.D9nU_y-e.js} +1 -1
  256. streamlit/static/static/js/useUpdateUiValue.ClTdrkJN.js +1 -0
  257. streamlit/static/static/js/{useWaveformController.DozaayUB.js → useWaveformController.lzTbjMW2.js} +1 -1
  258. streamlit/static/static/js/{withCalculatedWidth.SNNFFxhJ.js → withCalculatedWidth.Dxs9I5Oe.js} +1 -1
  259. streamlit/static/static/js/{withFullScreenWrapper.Dl2f8_gt.js → withFullScreenWrapper.DfpAcJxf.js} +1 -1
  260. streamlit/string_util.py +2 -2
  261. streamlit/testing/v1/app_test.py +1 -1
  262. streamlit/testing/v1/element_tree.py +33 -20
  263. streamlit/type_util.py +2 -2
  264. streamlit/url_util.py +2 -2
  265. streamlit/user_info.py +2 -41
  266. streamlit/util.py +1 -1
  267. streamlit/watcher/event_based_path_watcher.py +37 -7
  268. streamlit/watcher/path_watcher.py +61 -2
  269. streamlit/watcher/util.py +26 -10
  270. streamlit/web/bootstrap.py +16 -4
  271. streamlit/web/cli.py +1 -4
  272. streamlit/web/server/app_discovery.py +2 -1
  273. streamlit/web/server/app_static_file_handler.py +9 -0
  274. streamlit/web/server/bidi_component_request_handler.py +4 -4
  275. streamlit/web/server/component_file_utils.py +14 -6
  276. streamlit/web/server/component_request_handler.py +2 -2
  277. streamlit/web/server/oauth_authlib_routes.py +14 -42
  278. streamlit/web/server/server.py +1 -1
  279. streamlit/web/server/server_util.py +23 -1
  280. streamlit/web/server/starlette/starlette_app.py +7 -1
  281. streamlit/web/server/starlette/starlette_auth_routes.py +94 -16
  282. streamlit/web/server/starlette/starlette_path_security_middleware.py +97 -0
  283. streamlit/web/server/starlette/starlette_routes.py +16 -9
  284. streamlit/web/server/starlette/starlette_server.py +2 -2
  285. streamlit/web/server/starlette/starlette_static_routes.py +14 -4
  286. streamlit/web/server/stats_request_handler.py +1 -3
  287. {streamlit-1.53.0.dist-info → streamlit-1.54.0.dist-info}/METADATA +10 -25
  288. {streamlit-1.53.0.dist-info → streamlit-1.54.0.dist-info}/RECORD +291 -291
  289. {streamlit-1.53.0.dist-info → streamlit-1.54.0.dist-info}/WHEEL +1 -1
  290. streamlit/commands/experimental_query_params.py +0 -169
  291. streamlit/static/static/js/Particles.D5ZUTvE6.js +0 -1
  292. streamlit/static/static/js/Toolbar.BbO8bxwz.js +0 -1
  293. streamlit/static/static/js/embed.DQBlGL9Q.js +0 -195
  294. streamlit/static/static/js/index.5CsPRetw.js +0 -1
  295. streamlit/static/static/js/index.BGgra9Bb.js +0 -188
  296. streamlit/static/static/js/index.BGzJYcHz.js +0 -1
  297. streamlit/static/static/js/index.BNpEDrb2.js +0 -1
  298. streamlit/static/static/js/index.Bk5wGJXh.js +0 -1
  299. streamlit/static/static/js/index.By8GIgDH.js +0 -1
  300. streamlit/static/static/js/index.C8VoW8Ph.js +0 -1
  301. streamlit/static/static/js/index.CZzy-Gct.js +0 -1
  302. streamlit/static/static/js/index.CeFdbzfR.js +0 -11
  303. streamlit/static/static/js/index.CkmNfvPD.js +0 -1
  304. streamlit/static/static/js/index.CsmTnJl4.js +0 -3
  305. streamlit/static/static/js/index.DZGCJu4I.js +0 -2
  306. streamlit/static/static/js/index.svncz-Ad.js +0 -2
  307. streamlit/static/static/js/uniqueId.DEvFPH9n.js +0 -1
  308. streamlit/static/static/js/useUpdateUiValue.BWnXwmrp.js +0 -1
  309. streamlit-1.53.0.data/scripts/streamlit.cmd +0 -16
  310. {streamlit-1.53.0.dist-info → streamlit-1.54.0.dist-info}/entry_points.txt +0 -0
  311. {streamlit-1.53.0.dist-info → streamlit-1.54.0.dist-info}/top_level.txt +0 -0
@@ -592,10 +592,10 @@ def _get_positional_arg_name(func: Callable[..., Any], arg_index: int) -> str |
592
592
  if arg_index >= len(params):
593
593
  return None
594
594
 
595
- if params[arg_index].kind in (
595
+ if params[arg_index].kind in {
596
596
  inspect.Parameter.POSITIONAL_OR_KEYWORD,
597
597
  inspect.Parameter.POSITIONAL_ONLY,
598
- ):
598
+ }:
599
599
  return params[arg_index].name
600
600
 
601
601
  return None
@@ -25,7 +25,7 @@ import hashlib
25
25
  import inspect
26
26
  import io
27
27
  import os
28
- import pickle
28
+ import pickle # noqa: S403
29
29
  import sys
30
30
  import tempfile
31
31
  import threading
@@ -653,5 +653,3 @@ class _CacheFuncHasher:
653
653
 
654
654
  class NoResult:
655
655
  """Placeholder class for return values when None is meaningful."""
656
-
657
- pass
@@ -156,7 +156,6 @@ class CacheStorage(Protocol):
156
156
  to close open resources, before we delete the storage instance.
157
157
  e.g. close the database connection etc.
158
158
  """
159
- pass
160
159
 
161
160
 
162
161
  class CacheStorageManager(Protocol):
@@ -235,5 +234,3 @@ class CacheStorageManager(Protocol):
235
234
  -----
236
235
  Threading: Should be safe to call from any thread.
237
236
  """
238
-
239
- pass
@@ -99,7 +99,7 @@ def _create_connection(
99
99
  )
100
100
 
101
101
  scope = connection_class.scope()
102
- if scope not in ("global", "session"):
102
+ if scope not in {"global", "session"}:
103
103
  raise StreamlitAPIException(
104
104
  f"Connection class {connection_class} has scope '{scope}'. Valid values "
105
105
  "are 'global' or 'session'."
@@ -148,7 +148,7 @@ class Credentials:
148
148
  import toml
149
149
 
150
150
  try:
151
- with open(self._conf_file) as f:
151
+ with open(self._conf_file, encoding="utf-8") as f:
152
152
  data = toml.load(f).get("general")
153
153
  if data is None:
154
154
  raise RuntimeError # noqa: TRY301
@@ -218,7 +218,7 @@ class Credentials:
218
218
 
219
219
  import toml
220
220
 
221
- with open(self._conf_file, "w") as f:
221
+ with open(self._conf_file, "w", encoding="utf-8") as f:
222
222
  toml.dump({"general": data}, f)
223
223
 
224
224
  try:
@@ -251,11 +251,11 @@ def _get_machine_id_v3() -> str:
251
251
  """
252
252
 
253
253
  if os.path.isfile(_ETC_MACHINE_ID_PATH):
254
- with open(_ETC_MACHINE_ID_PATH) as f:
254
+ with open(_ETC_MACHINE_ID_PATH, encoding="utf-8") as f:
255
255
  machine_id = f.read()
256
256
 
257
257
  elif os.path.isfile(_DBUS_MACHINE_ID_PATH):
258
- with open(_DBUS_MACHINE_ID_PATH) as f:
258
+ with open(_DBUS_MACHINE_ID_PATH, encoding="utf-8") as f:
259
259
  machine_id = f.read()
260
260
 
261
261
  else:
@@ -380,7 +380,7 @@ def _get_command_telemetry(
380
380
  pos = i
381
381
  if is_method:
382
382
  # If func is a method, ignore the first argument (self)
383
- i = i + 1 # noqa: PLW2901
383
+ i += 1 # noqa: PLW2901
384
384
 
385
385
  keyword = arg_keywords[i] if len(arg_keywords) > i else f"{i}"
386
386
  if keyword == "self":
@@ -345,7 +345,7 @@ class Runtime:
345
345
  async_objs = self._get_async_objs()
346
346
 
347
347
  def stop_on_eventloop() -> None:
348
- if self._state in (RuntimeState.STOPPING, RuntimeState.STOPPED):
348
+ if self._state in {RuntimeState.STOPPING, RuntimeState.STOPPED}:
349
349
  return
350
350
 
351
351
  _LOGGER.debug("Runtime stopping...")
@@ -411,7 +411,7 @@ class Runtime:
411
411
  "This should never happen."
412
412
  )
413
413
 
414
- if self._state in (RuntimeState.STOPPING, RuntimeState.STOPPED):
414
+ if self._state in {RuntimeState.STOPPING, RuntimeState.STOPPED}:
415
415
  raise RuntimeStoppedError(f"Can't connect_session (state={self._state})")
416
416
 
417
417
  session_id = self._session_mgr.connect_session(
@@ -510,7 +510,7 @@ class Runtime:
510
510
  -----
511
511
  Threading: UNSAFE. Must be called on the eventloop thread.
512
512
  """
513
- if self._state in (RuntimeState.STOPPING, RuntimeState.STOPPED):
513
+ if self._state in {RuntimeState.STOPPING, RuntimeState.STOPPED}:
514
514
  raise RuntimeStoppedError(f"Can't handle_backmsg (state={self._state})")
515
515
 
516
516
  session_info = self._session_mgr.get_active_session_info(session_id)
@@ -538,7 +538,7 @@ class Runtime:
538
538
  -----
539
539
  Threading: UNSAFE. Must be called on the eventloop thread.
540
540
  """
541
- if self._state in (RuntimeState.STOPPING, RuntimeState.STOPPED):
541
+ if self._state in {RuntimeState.STOPPING, RuntimeState.STOPPED}:
542
542
  raise RuntimeStoppedError(
543
543
  f"Can't handle_backmsg_deserialization_exception (state={self._state})"
544
544
  )
@@ -555,11 +555,11 @@ class Runtime:
555
555
 
556
556
  @property
557
557
  async def is_ready_for_browser_connection(self) -> tuple[bool, str]:
558
- if self._state not in (
558
+ if self._state not in {
559
559
  RuntimeState.INITIAL,
560
560
  RuntimeState.STOPPING,
561
561
  RuntimeState.STOPPED,
562
- ):
562
+ }:
563
563
  return True, "ok"
564
564
 
565
565
  return False, "unavailable"
@@ -528,6 +528,23 @@ class ScriptRunner:
528
528
  and rerun_data.widget_states.widgets is not None
529
529
  ):
530
530
  widget_ids = {w.id for w in rerun_data.widget_states.widgets}
531
+
532
+ # For MPA page transitions: filter query params BEFORE cleanup.
533
+ # This uses existing bindings to remove params from other pages,
534
+ # ensuring st.query_params is accurate when the new page runs.
535
+ # (st.query_params in user code will reflect the correct params for the new page)
536
+ main_script_hash = self._pages_manager.main_script_hash
537
+ valid_script_hashes = {main_script_hash, page_script_hash}
538
+ with self._session_state.query_params() as qp:
539
+ qp.populate_from_query_string(
540
+ rerun_data.query_string, valid_script_hashes
541
+ )
542
+ # Set initial params from FILTERED state for widget seeding.
543
+ # This prevents stale params from previous pages from seeding
544
+ # widgets on the new page if keys collide.
545
+ qp.set_initial_query_params_from_current()
546
+
547
+ # Now safe to do normal cleanup - filtering already done
531
548
  self._session_state.on_script_finished(widget_ids)
532
549
 
533
550
  fragment_ids_this_run: list[str] | None = (
@@ -22,14 +22,10 @@ from streamlit.util import repr_
22
22
  class ScriptControlException(BaseException): # NOSONAR
23
23
  """Base exception for ScriptRunner."""
24
24
 
25
- pass
26
-
27
25
 
28
26
  class StopException(ScriptControlException):
29
27
  """Silently stop the execution of the user's script."""
30
28
 
31
- pass
32
-
33
29
 
34
30
  class RerunException(ScriptControlException):
35
31
  """Silently stop and rerun the user's script."""
@@ -24,11 +24,9 @@ from typing import (
24
24
  Final,
25
25
  TypeAlias,
26
26
  )
27
- from urllib import parse
28
27
 
29
28
  from streamlit.errors import (
30
29
  NoSessionContext,
31
- StreamlitAPIException,
32
30
  )
33
31
  from streamlit.logger import get_logger
34
32
  from streamlit.runtime.forward_msg_cache import (
@@ -109,10 +107,6 @@ class ScriptRunContext:
109
107
  # we allow only one dialog to be open at the same time
110
108
  has_dialog_opened: bool = False
111
109
 
112
- # TODO(willhuang1997): Remove this variable when experimental query params are removed
113
- _experimental_query_params_used = False
114
- _production_query_params_used = False
115
-
116
110
  @property
117
111
  def page_script_hash(self) -> str:
118
112
  return self.pages_manager.current_page_script_hash
@@ -147,6 +141,9 @@ class ScriptRunContext:
147
141
  cached_message_hashes: set[str] | None = None,
148
142
  context_info: ContextInfo | None = None,
149
143
  ) -> None:
144
+ # Check if this is a same-page rerun BEFORE updating page_script_hash
145
+ is_same_page = self.page_script_hash == page_script_hash
146
+
150
147
  self.cursors = {}
151
148
  self.widget_ids_this_run = set()
152
149
  self.widget_user_keys_this_run = set()
@@ -168,16 +165,17 @@ class ScriptRunContext:
168
165
 
169
166
  in_cached_function.set(False)
170
167
 
171
- parsed_query_params = parse.parse_qs(query_string, keep_blank_values=True)
172
168
  with self.session_state.query_params() as qp:
173
- qp.clear_with_no_forward_msg()
174
- for key, val in parsed_query_params.items():
175
- if len(val) == 0:
176
- qp.set_with_no_forward_msg(key, val="")
177
- elif len(val) == 1:
178
- qp.set_with_no_forward_msg(key, val=val[-1])
179
- else:
180
- qp.set_with_no_forward_msg(key, val)
169
+ # For same-page reruns (widget interactions), populate _query_params from URL
170
+ # and set initial params for widget seeding.
171
+ # For page transitions, both populate_from_query_string() AND
172
+ # set_initial_query_params_from_current() are called in script_runner.py
173
+ # BEFORE reset() to ensure filtering is applied to both _query_params
174
+ # AND _initial_query_params, preventing stale params from previous pages
175
+ # from seeding widgets on the new page.
176
+ if is_same_page:
177
+ qp.set_initial_query_params(query_string)
178
+ qp.populate_from_query_string(query_string)
181
179
 
182
180
  def on_script_start(self) -> None:
183
181
  self._has_script_started = True
@@ -202,22 +200,6 @@ class ScriptRunContext:
202
200
  # Pass the message up to our associated ScriptRunner.
203
201
  self._enqueue(msg_to_send)
204
202
 
205
- def ensure_single_query_api_used(self) -> None:
206
- if self._experimental_query_params_used and self._production_query_params_used:
207
- raise StreamlitAPIException(
208
- "Using `st.query_params` together with either `st.experimental_get_query_params` "
209
- "or `st.experimental_set_query_params` is not supported. Please "
210
- " convert your app to only use `st.query_params`"
211
- )
212
-
213
- def mark_experimental_query_params_used(self) -> None:
214
- self._experimental_query_params_used = True
215
- self.ensure_single_query_api_used()
216
-
217
- def mark_production_query_params_used(self) -> None:
218
- self._production_query_params_used = True
219
- self.ensure_single_query_api_used()
220
-
221
203
 
222
204
  SCRIPT_RUN_CONTEXT_ATTR_NAME: Final = "streamlit_script_run_ctx"
223
205
 
@@ -230,7 +230,6 @@ class Secrets(Mapping[str, Any]):
230
230
  """Left in place for compatibility with integrations until integration
231
231
  code can be updated.
232
232
  """
233
- pass
234
233
 
235
234
  def _reset(self) -> None:
236
235
  """Clear the secrets dictionary and remove any secrets that were
@@ -308,7 +307,7 @@ class Secrets(Mapping[str, Any]):
308
307
  if os.path.isdir(file_path):
309
308
  continue
310
309
 
311
- with open(file_path) as f:
310
+ with open(file_path, encoding="utf-8") as f:
312
311
  sub_secrets[filename] = f.read().strip()
313
312
  found_secrets_file = True
314
313
 
@@ -396,7 +395,7 @@ class Secrets(Mapping[str, Any]):
396
395
  is a string, int, or float.
397
396
  """
398
397
  value_type = type(v)
399
- if value_type in (str, int, float):
398
+ if value_type in {str, int, float}:
400
399
  os.environ[k] = str(v)
401
400
 
402
401
  @staticmethod
@@ -405,7 +404,7 @@ class Secrets(Mapping[str, Any]):
405
404
  is a string, int, or float.
406
405
  """
407
406
  value_type = type(v)
408
- if value_type in (str, int, float) and os.environ.get(k) == v:
407
+ if value_type in {str, int, float} and os.environ.get(k) == v:
409
408
  del os.environ[k]
410
409
 
411
410
  def _maybe_install_file_watchers(self) -> None:
@@ -12,7 +12,12 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- from streamlit.runtime.state.common import WidgetArgs, WidgetCallback, WidgetKwargs
15
+ from streamlit.runtime.state.common import (
16
+ BindOption,
17
+ WidgetArgs,
18
+ WidgetCallback,
19
+ WidgetKwargs,
20
+ )
16
21
  from streamlit.runtime.state.query_params_proxy import QueryParamsProxy
17
22
  from streamlit.runtime.state.safe_session_state import SafeSessionState
18
23
  from streamlit.runtime.state.session_state import (
@@ -28,6 +33,7 @@ from streamlit.runtime.state.widgets import register_widget
28
33
 
29
34
  __all__ = [
30
35
  "SCRIPT_RUN_WITHOUT_ERRORS_KEY",
36
+ "BindOption",
31
37
  "QueryParamsProxy",
32
38
  "SafeSessionState",
33
39
  "SessionState",
@@ -51,6 +51,10 @@ WidgetArgs: TypeAlias = tuple[Any, ...] | list[Any]
51
51
  WidgetKwargs: TypeAlias = dict[str, Any]
52
52
  WidgetCallback: TypeAlias = Callable[..., None]
53
53
 
54
+ # Type for the bind parameter on widgets
55
+ # Currently only supports binding to query params
56
+ BindOption: TypeAlias = Literal["query-params"] | None
57
+
54
58
  # A deserializer receives the value from whatever field is set on the
55
59
  # WidgetState proto, and returns a regular python value. A serializer
56
60
  # receives a regular python value, and returns something suitable for
@@ -147,6 +151,15 @@ class WidgetMetadata(Generic[T]):
147
151
  # multiple internal widget states.
148
152
  presenter: WidgetValuePresenter | None = None
149
153
 
154
+ # Optional binding for the widget's value to external state (e.g. query params)
155
+ bind: BindOption = None
156
+
157
+ # TODO(query-params): Remove formatted_options once all selection widgets use
158
+ # string-based wire formats (string_value/string_array_value).
159
+ # Currently used for query param binding to convert indices back to human-readable
160
+ # option strings in URLs when auto-correcting filtered values.
161
+ formatted_options: list[str] | None = None
162
+
150
163
  def __repr__(self) -> str:
151
164
  return util.repr_(self)
152
165