streamlit-nightly 1.46.2.dev20250701__py3-none-any.whl → 1.46.2.dev20250704__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 (98) hide show
  1. streamlit/auth_util.py +1 -1
  2. streamlit/config.py +21 -0
  3. streamlit/elements/doc_string.py +3 -0
  4. streamlit/elements/lib/column_types.py +46 -20
  5. streamlit/errors.py +6 -0
  6. streamlit/proto/NewSession_pb2.py +16 -16
  7. streamlit/proto/NewSession_pb2.pyi +5 -1
  8. streamlit/runtime/app_session.py +49 -1
  9. streamlit/runtime/caching/cache_data_api.py +34 -55
  10. streamlit/runtime/caching/cache_errors.py +9 -9
  11. streamlit/runtime/caching/cache_resource_api.py +26 -44
  12. streamlit/runtime/caching/cache_utils.py +37 -24
  13. streamlit/runtime/caching/cached_message_replay.py +13 -6
  14. streamlit/runtime/secrets.py +7 -2
  15. streamlit/static/index.html +1 -1
  16. streamlit/static/manifest.json +219 -219
  17. streamlit/static/static/css/index.2-JSeiMQ.css +1 -0
  18. streamlit/static/static/js/{ErrorOutline.esm.BPc3D9N9.js → ErrorOutline.esm.Dl5aYA7P.js} +1 -1
  19. streamlit/static/static/js/{FileDownload.esm.BiFtKhyO.js → FileDownload.esm.b9aAtFUL.js} +1 -1
  20. streamlit/static/static/js/{FileHelper.D4zH-LPy.js → FileHelper.CZ-fo3AT.js} +1 -1
  21. streamlit/static/static/js/{FormClearHelper.C0oAv5iO.js → FormClearHelper.X_JAWIDE.js} +1 -1
  22. streamlit/static/static/js/{Hooks.DUp04RsA.js → Hooks.DgDu8WWe.js} +1 -1
  23. streamlit/static/static/js/{InputInstructions.DDo33kg9.js → InputInstructions.DRcWCO4-.js} +1 -1
  24. streamlit/static/static/js/{ProgressBar.DluhCn8Y.js → ProgressBar.TfYA4ywP.js} +1 -1
  25. streamlit/static/static/js/{RenderInPortalIfExists.CgnRTw5b.js → RenderInPortalIfExists.DdXJh4rR.js} +1 -1
  26. streamlit/static/static/js/{Toolbar.Ds5GetiN.js → Toolbar.Vgf9NeBF.js} +1 -1
  27. streamlit/static/static/js/{base-input.WGo1U6ZF.js → base-input.DVejzOG3.js} +1 -1
  28. streamlit/static/static/js/{checkbox.D6n54iT6.js → checkbox.CHzUs1FT.js} +1 -1
  29. streamlit/static/static/js/{createSuper.5U626-en.js → createSuper.DtVUSUG3.js} +1 -1
  30. streamlit/static/static/js/data-grid-overlay-editor.0g3IWOH4.js +1 -0
  31. streamlit/static/static/js/{downloader.O2_sntfr.js → downloader.C1bmi7_d.js} +1 -1
  32. streamlit/static/static/js/{es6.q_Hnl4aM.js → es6.DB9CkkEz.js} +2 -2
  33. streamlit/static/static/js/{iframeResizer.contentWindow.CI0jLiDM.js → iframeResizer.contentWindow.BUdo9Eut.js} +1 -1
  34. streamlit/static/static/js/{index.DGehTu4y.js → index.B7_hmluD.js} +1 -1
  35. streamlit/static/static/js/{index.DFr6h2Mp.js → index.BFvFGupf.js} +1 -1
  36. streamlit/static/static/js/{index.TZ6Mn-5O.js → index.BGQkiO_L.js} +1 -1
  37. streamlit/static/static/js/{index.Chck3OtZ.js → index.BLe8vNj1.js} +1 -1
  38. streamlit/static/static/js/{index.BK_N8ZQx.js → index.BPv94ryA.js} +1 -1
  39. streamlit/static/static/js/{index.CSmIUY0Y.js → index.BSU3uPDy.js} +1 -1
  40. streamlit/static/static/js/{index.CydAyglg.js → index.BYDy3exs.js} +1 -1
  41. streamlit/static/static/js/{index.ivZN8Zb2.js → index.Bxl-lvf7.js} +1 -1
  42. streamlit/static/static/js/{index.DX-uvB3F.js → index.Bz1rmVZY.js} +1 -1
  43. streamlit/static/static/js/{index.BHq3ymE5.js → index.C6lv7LZF.js} +1 -1
  44. streamlit/static/static/js/{index.DLIPqPyW.js → index.CL2tKcqp.js} +1 -1
  45. streamlit/static/static/js/{index.BpJHZBLD.js → index.CUgLUHzz.js} +1 -1
  46. streamlit/static/static/js/{index.DExpy6fp.js → index.Ca71cNwT.js} +1 -1
  47. streamlit/static/static/js/{index.C4Ex7o_F.js → index.ChFrryup.js} +1 -1
  48. streamlit/static/static/js/{index.CJ2HNyRu.js → index.CsowBPbe.js} +1 -1
  49. streamlit/static/static/js/{index.fwYnPZir.js → index.D9G9SbyS.js} +1 -1
  50. streamlit/static/static/js/{index.d8SU82Ov.js → index.D9lVoZ0g.js} +1 -1
  51. streamlit/static/static/js/{index.C3nRmcoA.js → index.D9m0XlZY.js} +1 -1
  52. streamlit/static/static/js/{index.CVeKGjlc.js → index.DBSP2Mzg.js} +1 -1
  53. streamlit/static/static/js/{index.BIFkuq05.js → index.DJFU0ONs.js} +1 -1
  54. streamlit/static/static/js/{index.CssTumWz.js → index.DJM4CJwf.js} +1 -1
  55. streamlit/static/static/js/{index.DYssBBFR.js → index.DQtc0wgD.js} +1 -1
  56. streamlit/static/static/js/{index.D3dJUIaK.js → index.DYOc3lvA.js} +1 -1
  57. streamlit/static/static/js/index.DkDMkGP_.js +197 -0
  58. streamlit/static/static/js/{index.BcBDhWfd.js → index.DlvTB7Ab.js} +1 -1
  59. streamlit/static/static/js/{index.DvfUlU7_.js → index.Dmsp2dPx.js} +68 -68
  60. streamlit/static/static/js/index.MJ13AaAl.js +1 -0
  61. streamlit/static/static/js/{index.DKkRsEHh.js → index.Vqz4Rf-H.js} +1 -1
  62. streamlit/static/static/js/{index.Bx8y-PCC.js → index.WCZtB2fX.js} +1 -1
  63. streamlit/static/static/js/{index.Df3rWQZG.js → index.ZDNW54LS.js} +1 -1
  64. streamlit/static/static/js/{index.BgjJWPwA.js → index.bBcPxeDg.js} +1 -1
  65. streamlit/static/static/js/{index.BBvZmL8i.js → index.ffsleSUc.js} +1 -1
  66. streamlit/static/static/js/{index.6EiR9ocA.js → index.fnZJbfUF.js} +1 -1
  67. streamlit/static/static/js/{index.CdMiaTQu.js → index.lM0dtLa7.js} +1 -1
  68. streamlit/static/static/js/{index.DXUf_iJw.js → index.pxx1WhzW.js} +1 -1
  69. streamlit/static/static/js/{index.9k0LltIg.js → index.rSXfDs8E.js} +1 -1
  70. streamlit/static/static/js/{index.CuZeb5ME.js → index.zmzbyDg-.js} +1 -1
  71. streamlit/static/static/js/{input.Da7mGl-e.js → input.zZ5PCHhH.js} +1 -1
  72. streamlit/static/static/js/{memory.Ba9R8N9F.js → memory.BGxwio87.js} +1 -1
  73. streamlit/static/static/js/{mergeWith.DuOn5KYt.js → mergeWith.CAjjDs4h.js} +1 -1
  74. streamlit/static/static/js/{number-overlay-editor.Cies2BnB.js → number-overlay-editor.D6O6Urda.js} +1 -1
  75. streamlit/static/static/js/{possibleConstructorReturn.PFROJe03.js → possibleConstructorReturn.Bv3kil8b.js} +1 -1
  76. streamlit/static/static/js/{sandbox.BJEPeXCj.js → sandbox.DqowwceX.js} +1 -1
  77. streamlit/static/static/js/{textarea.C9d_M8Ah.js → textarea.mjUutfC5.js} +1 -1
  78. streamlit/static/static/js/{timepicker.DqRJAopc.js → timepicker.D5asOTRg.js} +1 -1
  79. streamlit/static/static/js/{toConsumableArray.BFmb1pdq.js → toConsumableArray.CbOloveN.js} +1 -1
  80. streamlit/static/static/js/{uniqueId.BJtPrMww.js → uniqueId.DldNV5wM.js} +1 -1
  81. streamlit/static/static/js/{useBasicWidgetState.DKrm_jMv.js → useBasicWidgetState.DILnXvLY.js} +1 -1
  82. streamlit/static/static/js/{useOnInputChange.DVjdiDhw.js → useOnInputChange.Bpbev6mM.js} +1 -1
  83. streamlit/static/static/js/withFullScreenWrapper.Dgyv-A2q.js +1 -0
  84. streamlit/watcher/event_based_path_watcher.py +76 -44
  85. streamlit/watcher/local_sources_watcher.py +22 -19
  86. streamlit/watcher/polling_path_watcher.py +29 -18
  87. streamlit/watcher/util.py +7 -8
  88. {streamlit_nightly-1.46.2.dev20250701.dist-info → streamlit_nightly-1.46.2.dev20250704.dist-info}/METADATA +1 -1
  89. {streamlit_nightly-1.46.2.dev20250701.dist-info → streamlit_nightly-1.46.2.dev20250704.dist-info}/RECORD +93 -93
  90. streamlit/static/static/css/index.C5t3M85E.css +0 -1
  91. streamlit/static/static/js/data-grid-overlay-editor.BArb4CJR.js +0 -1
  92. streamlit/static/static/js/index.BE0RFnDe.js +0 -197
  93. streamlit/static/static/js/index.Cut1d44J.js +0 -1
  94. streamlit/static/static/js/withFullScreenWrapper.CAgTFtpw.js +0 -1
  95. {streamlit_nightly-1.46.2.dev20250701.data → streamlit_nightly-1.46.2.dev20250704.data}/scripts/streamlit.cmd +0 -0
  96. {streamlit_nightly-1.46.2.dev20250701.dist-info → streamlit_nightly-1.46.2.dev20250704.dist-info}/WHEEL +0 -0
  97. {streamlit_nightly-1.46.2.dev20250701.dist-info → streamlit_nightly-1.46.2.dev20250704.dist-info}/entry_points.txt +0 -0
  98. {streamlit_nightly-1.46.2.dev20250701.dist-info → streamlit_nightly-1.46.2.dev20250704.dist-info}/top_level.txt +0 -0
@@ -17,7 +17,9 @@ from __future__ import annotations
17
17
  import contextlib
18
18
  import threading
19
19
  from dataclasses import dataclass
20
- from typing import TYPE_CHECKING, Any, Literal, Union
20
+ from typing import TYPE_CHECKING, Any, Callable, Generic, Literal, TypeVar, Union
21
+
22
+ from typing_extensions import ParamSpec
21
23
 
22
24
  import streamlit as st
23
25
  from streamlit import runtime, util
@@ -29,7 +31,6 @@ from streamlit.runtime.scriptrunner_utils.script_run_context import (
29
31
 
30
32
  if TYPE_CHECKING:
31
33
  from collections.abc import Iterator
32
- from types import FunctionType
33
34
 
34
35
  from google.protobuf.message import Message
35
36
 
@@ -70,13 +71,16 @@ class BlockMsgData:
70
71
  MsgData = Union[ElementMsgData, BlockMsgData]
71
72
 
72
73
 
74
+ R = TypeVar("R")
75
+
76
+
73
77
  @dataclass
74
- class CachedResult:
78
+ class CachedResult(Generic[R]):
75
79
  """The full results of calling a cache-decorated function, enough to
76
80
  replay the st functions called while executing it.
77
81
  """
78
82
 
79
- value: Any
83
+ value: R
80
84
  messages: list[MsgData]
81
85
  main_id: str
82
86
  sidebar_id: str
@@ -132,7 +136,7 @@ class CachedMessageReplayContext(threading.local):
132
136
  return util.repr_(self)
133
137
 
134
138
  @contextlib.contextmanager
135
- def calling_cached_function(self, func: FunctionType) -> Iterator[None]: # noqa: ARG002
139
+ def calling_cached_function(self, func: Callable[..., Any]) -> Iterator[None]: # noqa: ARG002
136
140
  """Context manager that should wrap the invocation of a cached function.
137
141
  It allows us to track any `st.foo` messages that are generated from inside the
138
142
  function for playback during cache retrieval.
@@ -233,8 +237,11 @@ class CachedMessageReplayContext(threading.local):
233
237
  self._media_data.append(MediaMsgData(media_data, mimetype, media_id))
234
238
 
235
239
 
240
+ P = ParamSpec("P")
241
+
242
+
236
243
  def replay_cached_messages(
237
- result: CachedResult, cache_type: CacheType, cached_func: FunctionType
244
+ result: CachedResult[R], cache_type: CacheType, cached_func: Callable[P, R]
238
245
  ) -> None:
239
246
  """Replay the st element function calls that happened when executing a
240
247
  cache-decorated function.
@@ -429,9 +429,14 @@ class Secrets(Mapping[str, Any]):
429
429
  self._on_secrets_changed,
430
430
  watcher_type="poll",
431
431
  )
432
- except FileNotFoundError: # noqa: PERF203
432
+ except Exception: # noqa: PERF203
433
+ _LOGGER.debug(
434
+ "Failed to install file watcher for secret file path %s",
435
+ path,
436
+ exc_info=True,
437
+ )
433
438
  # A user may only have one secrets.toml file defined, so we'd expect
434
- # FileNotFoundErrors to be raised when attempting to install a
439
+ # exceptions to be raised when attempting to install a
435
440
  # watcher on the nonexistent ones.
436
441
  pass
437
442
 
@@ -37,7 +37,7 @@
37
37
  <script>
38
38
  window.prerenderReady = false
39
39
  </script>
40
- <script type="module" crossorigin src="./static/js/index.DvfUlU7_.js"></script>
40
+ <script type="module" crossorigin src="./static/js/index.Dmsp2dPx.js"></script>
41
41
  <link rel="stylesheet" crossorigin href="./static/css/index.CJVRHjQZ.css">
42
42
  </head>
43
43
  <body>