streamlit-nightly 1.52.3.dev20260107__py3-none-any.whl → 1.52.3.dev20260109__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 (127) hide show
  1. streamlit/components/v2/__init__.py +3 -3
  2. streamlit/components/v2/types.py +4 -4
  3. streamlit/config.py +14 -0
  4. streamlit/connections/__init__.py +5 -1
  5. streamlit/connections/snowflake_connection.py +203 -57
  6. streamlit/elements/lib/options_selector_utils.py +98 -0
  7. streamlit/elements/widgets/multiselect.py +19 -9
  8. streamlit/elements/widgets/selectbox.py +12 -24
  9. streamlit/proto/MetricsEvent_pb2.py +4 -4
  10. streamlit/proto/MetricsEvent_pb2.pyi +4 -1
  11. streamlit/proto/PageProfile_pb2.py +6 -6
  12. streamlit/proto/PageProfile_pb2.pyi +11 -1
  13. streamlit/runtime/connection_factory.py +25 -0
  14. streamlit/runtime/metrics_util.py +4 -0
  15. streamlit/runtime/runtime.py +3 -0
  16. streamlit/starlette.py +34 -0
  17. streamlit/static/index.html +1 -1
  18. streamlit/static/manifest.json +291 -291
  19. streamlit/static/static/js/{ErrorOutline.esm.D2r71uaM.js → ErrorOutline.esm.BcqUpfNe.js} +1 -1
  20. streamlit/static/static/js/{FileDownload.esm.BWEHU45R.js → FileDownload.esm.CtJWBuub.js} +1 -1
  21. streamlit/static/static/js/{FileHelper.bM5nEcHb.js → FileHelper.D0dQPhOs.js} +1 -1
  22. streamlit/static/static/js/{FormClearHelper.DrhgNNta.js → FormClearHelper.Cm3GDSk6.js} +1 -1
  23. streamlit/static/static/js/{InputInstructions.DPiGX0Th.js → InputInstructions.D7Hxdzwv.js} +1 -1
  24. streamlit/static/static/js/{Particles.NjZlN0Ji.js → Particles.vAUDtAR8.js} +1 -1
  25. streamlit/static/static/js/{ProgressBar.BC4DXqMl.js → ProgressBar.Dp2CGRba.js} +2 -2
  26. streamlit/static/static/js/{StreamlitSyntaxHighlighter.CbRgSaN7.js → StreamlitSyntaxHighlighter.DC0000nJ.js} +1 -1
  27. streamlit/static/static/js/{TableChart.esm.gttTfh7r.js → TableChart.esm.DDVoSKOT.js} +1 -1
  28. streamlit/static/static/js/{Toolbar.DO2JfHk1.js → Toolbar.CuMH-Gqe.js} +1 -1
  29. streamlit/static/static/js/{WidgetLabelHelpIconInline.NVlzvmTZ.js → WidgetLabelHelpIconInline.WAReecol.js} +1 -1
  30. streamlit/static/static/js/{base-input.CmG3KTuv.js → base-input.BX9Jll5o.js} +4 -4
  31. streamlit/static/static/js/{checkbox.cfHeGdGI.js → checkbox.BzMHUSz1.js} +1 -1
  32. streamlit/static/static/js/{createDownloadLinkElement.B59a5_bn.js → createDownloadLinkElement.CviG5BQx.js} +1 -1
  33. streamlit/static/static/js/{data-grid-overlay-editor.DpTe47v0.js → data-grid-overlay-editor.Dzo9A4l6.js} +1 -1
  34. streamlit/static/static/js/{downloader.CYtKIJ9J.js → downloader.DIDvj0d5.js} +1 -1
  35. streamlit/static/static/js/{embed.Dfyy6eKR.js → embed.C8qeQ38b.js} +6 -6
  36. streamlit/static/static/js/{es6.x2A9auGg.js → es6.Dpcc-U7U.js} +2 -2
  37. streamlit/static/static/js/{formatNumber.D8YUVHBi.js → formatNumber.CPvuaBa8.js} +1 -1
  38. streamlit/static/static/js/{iconPosition.C6Qxuo2L.js → iconPosition.y0q-Rqem.js} +1 -1
  39. streamlit/static/static/js/{iframeResizer.contentWindow.Q0Cy4mzM.js → iframeResizer.contentWindow.DblExdXF.js} +1 -1
  40. streamlit/static/static/js/{index.BICn75_M.js → index.B-g6lwYa.js} +1 -1
  41. streamlit/static/static/js/{index.CcpuNeOs.js → index.B10MmI2m.js} +1 -1
  42. streamlit/static/static/js/{index.BTcImDDt.js → index.B6vCS66f.js} +7 -7
  43. streamlit/static/static/js/{index.mRYkGVRy.js → index.B9TG5Ah8.js} +1 -1
  44. streamlit/static/static/js/{index.CEB-gMZu.js → index.BDb0PRvK.js} +1 -1
  45. streamlit/static/static/js/{index.WMC0NWRg.js → index.BGufEmCz.js} +1 -1
  46. streamlit/static/static/js/{index.DfXZgqLi.js → index.BItU4jMo.js} +1 -1
  47. streamlit/static/static/js/{index.Dmaco99Q.js → index.BPMqWDef.js} +1 -1
  48. streamlit/static/static/js/index.BTHi5W25.js +1 -0
  49. streamlit/static/static/js/{index.Bs9bS4ZQ.js → index.BVN9cI-k.js} +1 -1
  50. streamlit/static/static/js/index.BWOP7HFT.js +1 -0
  51. streamlit/static/static/js/{index.CzMaYu3-.js → index.BXYgO5B8.js} +1 -1
  52. streamlit/static/static/js/{index.BuCGo7-5.js → index.BZBWLU1C.js} +9 -9
  53. streamlit/static/static/js/{index.i5tC1QD-.js → index.BfZdZpv-.js} +2 -2
  54. streamlit/static/static/js/{index.72U0nUaY.js → index.Bxe7fKbw.js} +1 -1
  55. streamlit/static/static/js/{index.D2pbLWvp.js → index.C1ElSZEy.js} +1 -1
  56. streamlit/static/static/js/index.C26ZOVFL.js +1 -0
  57. streamlit/static/static/js/{index.DyL5do6X.js → index.C7lwRBvF.js} +1 -1
  58. streamlit/static/static/js/{index.DDUzbOzY.js → index.C93QGPyk.js} +1 -1
  59. streamlit/static/static/js/{index.WW20lmQl.js → index.CCDejIvL.js} +2 -2
  60. streamlit/static/static/js/index.CcMmNHAq.js +1 -0
  61. streamlit/static/static/js/index.D42y-GeO.js +1 -0
  62. streamlit/static/static/js/{index.Bmo0a9c3.js → index.D69ULFWq.js} +1 -1
  63. streamlit/static/static/js/{index.DltYrNjp.js → index.DB4MbQ40.js} +3 -3
  64. streamlit/static/static/js/{index.9lrRft8u.js → index.DRFJgBf-.js} +1 -1
  65. streamlit/static/static/js/{index.DzZhu8Ry.js → index.DTK-btqV.js} +1 -1
  66. streamlit/static/static/js/{index.CCkh_YSD.js → index.DZEQ0G7H.js} +1 -1
  67. streamlit/static/static/js/{index.Zffuf6-0.js → index.DaU1ayM7.js} +1 -1
  68. streamlit/static/static/js/{index.BA25ZBoD.js → index.Dla9XiNe.js} +2 -2
  69. streamlit/static/static/js/{index.AF9wK9Wi.js → index.DmQqT9OM.js} +1 -1
  70. streamlit/static/static/js/{index.5zBrLB5N.js → index.DppScppA.js} +1 -1
  71. streamlit/static/static/js/{index.DrHoCPek.js → index.Dr8b3Vn6.js} +2 -2
  72. streamlit/static/static/js/{index.BSULROGA.js → index.DvQ7-afx.js} +1 -1
  73. streamlit/static/static/js/{index.DMtSM2QJ.js → index.F-NmmwfK.js} +1 -1
  74. streamlit/static/static/js/{index.4evoB7lO.js → index.MKI8t7l2.js} +1 -1
  75. streamlit/static/static/js/{index.BtasgGzT.js → index.RRAKXgBZ.js} +1 -1
  76. streamlit/static/static/js/{index.9i44yl-A.js → index.VSsf6tsu.js} +2 -2
  77. streamlit/static/static/js/{index.CWEfMTRP.js → index.aEeM0ekc.js} +1 -1
  78. streamlit/static/static/js/{index.Cto6hKVz.js → index.eweE9HKU.js} +1 -1
  79. streamlit/static/static/js/{index.DFrG8naT.js → index.gr6yGiCL.js} +1 -1
  80. streamlit/static/static/js/{index.Dm8qt8Me.js → index.kKkHk9Mc.js} +1 -1
  81. streamlit/static/static/js/index.pMvzHC7z.js +1 -0
  82. streamlit/static/static/js/{index.DMgiqc8r.js → index.pgifwCIr.js} +1 -1
  83. streamlit/static/static/js/index.q83b8_8b.js +1 -0
  84. streamlit/static/static/js/index.u2AvcQQT.js +1 -0
  85. streamlit/static/static/js/{index.BHzkSOU6.js → index.w2_VrtVw.js} +1 -1
  86. streamlit/static/static/js/{index.4DpGzJxM.js → index.wv1DYVsn.js} +1 -1
  87. streamlit/static/static/js/{index.DemMZEQt.js → index.x4j6nnNb.js} +1 -1
  88. streamlit/static/static/js/{input.C76A8APa.js → input.BoJqOS7a.js} +1 -1
  89. streamlit/static/static/js/{main.CFbvktEv.js → main.B5XmUwmQ.js} +1 -1
  90. streamlit/static/static/js/{memory.BkhqbxJl.js → memory.9izgq54V.js} +1 -1
  91. streamlit/static/static/js/{number-overlay-editor.Dpeh6_Ag.js → number-overlay-editor.PqOGQcLn.js} +1 -1
  92. streamlit/static/static/js/{pandasStylerUtils.D8MDzfFI.js → pandasStylerUtils.DUtF2t3R.js} +1 -1
  93. streamlit/static/static/js/{sandbox.m1TYtBuF.js → sandbox.DgKTHPLO.js} +1 -1
  94. streamlit/static/static/js/{styled-components.yin3sIMA.js → styled-components.D4x8jmOI.js} +1 -1
  95. streamlit/static/static/js/{throttle.Df6MiNTy.js → throttle.DxEHIIp7.js} +1 -1
  96. streamlit/static/static/js/{timepicker.gcx4yeRx.js → timepicker.CDks5DWI.js} +1 -1
  97. streamlit/static/static/js/{toConsumableArray.Ca7RO9Jm.js → toConsumableArray.CvTQRsV-.js} +1 -1
  98. streamlit/static/static/js/uniqueId.RScLN3St.js +1 -0
  99. streamlit/static/static/js/{useBasicWidgetState.CRkPCtR5.js → useBasicWidgetState.D6_b0IqA.js} +1 -1
  100. streamlit/static/static/js/{useIntlLocale.CFOMULNz.js → useIntlLocale.Ctz17A7g.js} +1 -1
  101. streamlit/static/static/js/{useTextInputAutoExpand.9c205rhQ.js → useTextInputAutoExpand.PAFB5o1T.js} +1 -1
  102. streamlit/static/static/js/{useUpdateUiValue.SYJJuEJM.js → useUpdateUiValue.CcTvmGlb.js} +1 -1
  103. streamlit/static/static/js/{useWaveformController.CCs9fdSv.js → useWaveformController.vLi36Ir4.js} +1 -1
  104. streamlit/static/static/js/{withCalculatedWidth.MG9RY_Y-.js → withCalculatedWidth.BtA2jL5-.js} +1 -1
  105. streamlit/static/static/js/{withFullScreenWrapper.BgGLtZrC.js → withFullScreenWrapper.CeeoYBpc.js} +1 -1
  106. streamlit/web/bootstrap.py +105 -10
  107. streamlit/web/cli.py +21 -4
  108. streamlit/web/server/app_discovery.py +421 -0
  109. streamlit/web/server/server.py +0 -13
  110. streamlit/web/server/starlette/__init__.py +2 -1
  111. streamlit/web/server/starlette/starlette_app.py +326 -3
  112. streamlit/web/server/starlette/starlette_routes.py +27 -8
  113. {streamlit_nightly-1.52.3.dev20260107.dist-info → streamlit_nightly-1.52.3.dev20260109.dist-info}/METADATA +1 -1
  114. {streamlit_nightly-1.52.3.dev20260107.dist-info → streamlit_nightly-1.52.3.dev20260109.dist-info}/RECORD +118 -116
  115. streamlit/static/static/js/index.7BBVjqsx.js +0 -1
  116. streamlit/static/static/js/index.CgFM5y1b.js +0 -1
  117. streamlit/static/static/js/index.Cszkm2ii.js +0 -1
  118. streamlit/static/static/js/index.DlXiDt-m.js +0 -1
  119. streamlit/static/static/js/index.HTZptmDX.js +0 -1
  120. streamlit/static/static/js/index.mUwcAQrC.js +0 -1
  121. streamlit/static/static/js/index.up8HPR4v.js +0 -1
  122. streamlit/static/static/js/index.xQYe72hk.js +0 -1
  123. streamlit/static/static/js/uniqueId.Bf2Hsb60.js +0 -1
  124. {streamlit_nightly-1.52.3.dev20260107.data → streamlit_nightly-1.52.3.dev20260109.data}/scripts/streamlit.cmd +0 -0
  125. {streamlit_nightly-1.52.3.dev20260107.dist-info → streamlit_nightly-1.52.3.dev20260109.dist-info}/WHEEL +0 -0
  126. {streamlit_nightly-1.52.3.dev20260107.dist-info → streamlit_nightly-1.52.3.dev20260109.dist-info}/entry_points.txt +0 -0
  127. {streamlit_nightly-1.52.3.dev20260107.dist-info → streamlit_nightly-1.52.3.dev20260109.dist-info}/top_level.txt +0 -0
@@ -28,7 +28,7 @@ from streamlit.components.v2.get_bidi_component_manager import (
28
28
  from streamlit.errors import StreamlitAPIException
29
29
 
30
30
  if TYPE_CHECKING:
31
- from streamlit.components.v2.types import BidiComponentCallable
31
+ from streamlit.components.v2.types import ComponentRenderer
32
32
 
33
33
  if TYPE_CHECKING:
34
34
  from collections.abc import Callable
@@ -211,7 +211,7 @@ def component(
211
211
  css: str | None = None,
212
212
  js: str | None = None,
213
213
  isolate_styles: bool = True,
214
- ) -> BidiComponentCallable:
214
+ ) -> ComponentRenderer:
215
215
  '''Register an ``st.components.v2`` component and return a callable to mount it.
216
216
 
217
217
  Components may provide any combination of HTML, CSS, and JavaScript. If none
@@ -287,7 +287,7 @@ def component(
287
287
 
288
288
  Returns
289
289
  -------
290
- BidiComponentCallable
290
+ ComponentRenderer
291
291
  The component's mounting command.
292
292
 
293
293
  This callable accepts the component parameters like ``key`` and
@@ -45,7 +45,7 @@ BidiComponentDefaults = dict[str, Any] | None
45
45
  ComponentIsolateStyles = bool
46
46
 
47
47
 
48
- class BidiComponentCallable(Protocol):
48
+ class ComponentRenderer(Protocol):
49
49
  '''Signature of the mounting command returned by ``st.components.v2.component``.
50
50
 
51
51
  This callable mounts a bidirectional component in a Streamlit app and
@@ -69,8 +69,8 @@ class BidiComponentCallable(Protocol):
69
69
  .. note::
70
70
  If you want to access this key in your component's frontend, you
71
71
  must pass it explicitly within the ``data`` parameter. The ``key``
72
- parameter in ``BidiComponentCallable`` is not the same as the
73
- ``key`` property in ``ComponentArgs`` in the component's frontend
72
+ parameter in ``ComponentRenderer`` is not the same as the
73
+ ``key`` property in ``FrontendRendererArgs`` in the component's frontend
74
74
  code.
75
75
 
76
76
  The frontend key is automatically generated to be unique among all
@@ -309,9 +309,9 @@ class BidiComponentCallable(Protocol):
309
309
 
310
310
 
311
311
  __all__ = [
312
- "BidiComponentCallable",
313
312
  "BidiComponentData",
314
313
  "BidiComponentDefaults",
315
314
  "BidiComponentKey",
316
315
  "ComponentIsolateStyles",
316
+ "ComponentRenderer",
317
317
  ]
streamlit/config.py CHANGED
@@ -62,6 +62,20 @@ _config_options: dict[str, ConfigOption] | None = None
62
62
  # resolve config and secret files relative to the main script:
63
63
  _main_script_path: str | None = None
64
64
 
65
+ # Stores the server mode for metrics tracking.
66
+ # Possible values:
67
+ # - "tornado": Traditional Tornado server
68
+ # - "starlette-managed": Starlette server via server.useStarlette config
69
+ # - "starlette-app": st.App started via streamlit run
70
+ # - "asgi-server": st.App with external ASGI server (uvicorn, gunicorn, etc.)
71
+ # - "asgi-mounted": st.App mounted on another ASGI framework (FastAPI, Starlette)
72
+ _server_mode: (
73
+ Literal[
74
+ "tornado", "starlette-managed", "starlette-app", "asgi-server", "asgi-mounted"
75
+ ]
76
+ | None
77
+ ) = None
78
+
65
79
  # Indicates that a config option was defined by the user.
66
80
  _USER_DEFINED: Final = "<user defined>"
67
81
 
@@ -13,7 +13,10 @@
13
13
  # limitations under the License.
14
14
 
15
15
  from streamlit.connections.base_connection import BaseConnection
16
- from streamlit.connections.snowflake_connection import SnowflakeConnection
16
+ from streamlit.connections.snowflake_connection import (
17
+ SnowflakeCallersRightsConnection,
18
+ SnowflakeConnection,
19
+ )
17
20
  from streamlit.connections.snowpark_connection import SnowparkConnection
18
21
  from streamlit.connections.sql_connection import SQLConnection
19
22
 
@@ -23,6 +26,7 @@ __all__ = [
23
26
  "BaseConnection",
24
27
  "ExperimentalBaseConnection",
25
28
  "SQLConnection",
29
+ "SnowflakeCallersRightsConnection",
26
30
  "SnowflakeConnection",
27
31
  "SnowparkConnection",
28
32
  ]
@@ -20,7 +20,8 @@
20
20
 
21
21
  from __future__ import annotations
22
22
 
23
- from typing import TYPE_CHECKING, Any, Final, cast
23
+ import os
24
+ from typing import TYPE_CHECKING, Any, Final, Literal, cast
24
25
 
25
26
  from streamlit import logger
26
27
  from streamlit.connections import BaseConnection
@@ -45,11 +46,18 @@ if TYPE_CHECKING:
45
46
  # (see docs: https://docs.snowflake.com/en/developer-guide/python-connector/python-connector-api#id6)
46
47
  SQLSTATE_CONNECTION_WAS_NOT_ESTABLISHED: Final = "08001"
47
48
 
49
+ # The location on disk where Snowpark Container Services will mount service connection tokens.
50
+ SNOWPARK_CONNECTION_TOKEN_FILE = "/snowflake/session/token" # noqa: S105 (not a password)
48
51
 
49
- class SnowflakeConnection(BaseConnection["InternalSnowflakeConnection"]):
52
+ # The header where Snowpark Container Services will put per-user connection tokens.
53
+ SNOWPARK_USER_TOKEN_HEADER_NAME = "Sf-Context-Current-User-Token" # noqa: S105 (not a password)
54
+
55
+
56
+ class BaseSnowflakeConnection(BaseConnection["InternalSnowflakeConnection"]):
50
57
  """A connection to Snowflake using the Snowflake Connector for Python.
51
58
 
52
- Initialize this connection object using ``st.connection("snowflake")`` or
59
+ For standard connections, create an instance of this using
60
+ ``st.connection("snowflake")`` or
53
61
  ``st.connection("<name>", type="snowflake")``. Connection parameters for a
54
62
  SnowflakeConnection can be specified using ``secrets.toml`` and/or
55
63
  ``**kwargs``. Connection parameters are passed to
@@ -61,7 +69,14 @@ class SnowflakeConnection(BaseConnection["InternalSnowflakeConnection"]):
61
69
  case. Use ``secrets.toml`` and ``**kwargs`` to configure your connection
62
70
  for local development.
63
71
 
64
- SnowflakeConnection includes several convenience methods. For example, you
72
+ When an app is running in Snowpark Container Services and has caller's rights
73
+ enabled, ``st.connection("snowflake-callers-rights")`` connects automatically
74
+ using the current user's identity tokens. This will be a session-scoped connection
75
+ to ensure that the identity stays tied to the active user. Unlike with
76
+ ``"snowflake"`` connections, it will use the Snowpark Container Services connection
77
+ settings even when other ``**kwargs`` are provided.
78
+
79
+ BaseSnowflakeConnection includes several convenience methods. For example, you
65
80
  can directly execute a SQL query with ``.query()`` or access the underlying
66
81
  Snowflake Connector object with ``.raw_connection``.
67
82
 
@@ -85,6 +100,12 @@ class SnowflakeConnection(BaseConnection["InternalSnowflakeConnection"]):
85
100
  in SQL queries. For more information, see `Account identifiers
86
101
  <https://docs.snowflake.com/en/user-guide/admin-account-identifier>`_.
87
102
 
103
+ .. Important::
104
+ Caller's rights connections rely on credentials provided when a user first
105
+ connects to a Streamlit app. These credentials are only valid for a short period
106
+ of time - so caller's rights connections must be created at the top of an app
107
+ or else the connection may fail.
108
+
88
109
  Examples
89
110
  --------
90
111
  **Example 1: Configuration with Streamlit secrets**
@@ -222,64 +243,23 @@ class SnowflakeConnection(BaseConnection["InternalSnowflakeConnection"]):
222
243
  >>> conn = st.connection("snowflake")
223
244
  >>> df = conn.query("SELECT * FROM my_table")
224
245
 
225
- """
246
+ **Example 7: Caller's rights connection when running in Snowpark Container Services**
226
247
 
227
- def _connect(self, **kwargs: Any) -> InternalSnowflakeConnection:
228
- import snowflake.connector # type:ignore[import]
229
- from snowflake.connector import Error as SnowflakeError # type:ignore[import]
248
+ This connection will work for any Streamlit-in-Snowflake app using a container
249
+ runtime, as well as any self-managed caller's rights Service in Snowpark Container
250
+ Services that is hosting Streamlit.
230
251
 
231
- # If we're running in SiS, just call get_active_session() and retrieve the
232
- # lower-level connection from it.
233
- if running_in_sis():
234
- from snowflake.snowpark.context import ( # type:ignore[import] # isort: skip
235
- get_active_session,
236
- )
237
-
238
- session = get_active_session()
252
+ This will use the Snowpark-provided account, host, database, and schema to connect.
253
+ Additionally, it will set ``client_session_keep_alive`` to ``True``. These values
254
+ may be overridden with ``**kwargs``.
239
255
 
240
- if hasattr(session, "connection"):
241
- return session.connection
242
- # session.connection is only a valid attr in more recent versions of
243
- # snowflake-connector-python, so we fall back to grabbing
244
- # session._conn._conn if `.connection` is unavailable.
245
- return session._conn._conn
246
-
247
- # We require qmark-style parameters everywhere for consistency across different
248
- # environments where SnowflakeConnections may be used.
249
- snowflake.connector.paramstyle = "qmark"
250
-
251
- # Otherwise, attempt to create a new connection from whatever credentials we
252
- # have available.
253
- st_secrets = self._secrets.to_dict()
254
- try:
255
- if len(st_secrets):
256
- _LOGGER.info(
257
- "Connect to Snowflake using the Streamlit secret defined under "
258
- "[connections.snowflake]."
259
- )
260
- conn_kwargs = {**st_secrets, **kwargs}
261
- return snowflake.connector.connect(**conn_kwargs)
256
+ Your app code:
262
257
 
263
- # Use the default configuration as defined in https://docs.snowflake.com/en/developer-guide/python-connector/python-connector-connect#setting-a-default-connection
264
- if self._connection_name == "snowflake":
265
- _LOGGER.info(
266
- "Connect to Snowflake using the default configuration as defined "
267
- "in https://docs.snowflake.com/en/developer-guide/python-connector/python-connector-connect#setting-a-default-connection"
268
- )
269
- return snowflake.connector.connect()
258
+ >>> import streamlit as st
259
+ >>> conn = st.connection("snowflake-callers-rights")
260
+ >>> df = conn.query("SELECT * FROM my_table")
270
261
 
271
- return snowflake.connector.connect(**kwargs)
272
- except SnowflakeError:
273
- if not len(st_secrets) and not kwargs:
274
- raise StreamlitAPIException(
275
- "Missing Snowflake connection configuration. "
276
- "Did you forget to set this in `secrets.toml`, a Snowflake configuration file, "
277
- "or as kwargs to `st.connection`? "
278
- "See the [SnowflakeConnection configuration documentation]"
279
- "(https://docs.streamlit.io/st.connections.snowflakeconnection-configuration) "
280
- "for more details and examples."
281
- )
282
- raise
262
+ """
283
263
 
284
264
  def query(
285
265
  self,
@@ -563,3 +543,169 @@ class SnowflakeConnection(BaseConnection["InternalSnowflakeConnection"]):
563
543
  return cast(
564
544
  "Session", Session.builder.configs({"connection": self._instance}).create()
565
545
  )
546
+
547
+ def close(self) -> None:
548
+ """Closes the underlying Snowflake connection."""
549
+ if self._raw_instance is not None:
550
+ self._raw_instance.close()
551
+
552
+
553
+ class SnowflakeConnection(BaseSnowflakeConnection):
554
+ """A connection to Snowflake using the Snowflake Connector for Python.
555
+
556
+ See ``BaseSnowflakeConnection`` for complete docs.
557
+ """
558
+
559
+ def _connect(self, **kwargs: Any) -> InternalSnowflakeConnection:
560
+ import snowflake.connector # type:ignore[import]
561
+ from snowflake.connector import Error as SnowflakeError # type:ignore[import]
562
+
563
+ # If we're running in SiS-on-warehouses, just call get_active_session() and
564
+ # retrieve the lower-level connection from it.
565
+ if running_in_sis():
566
+ from snowflake.snowpark.context import ( # type:ignore[import] # isort: skip
567
+ get_active_session,
568
+ )
569
+
570
+ session = get_active_session()
571
+
572
+ if hasattr(session, "connection"):
573
+ return session.connection
574
+ # session.connection is only a valid attr in more recent versions of
575
+ # snowflake-connector-python, so we fall back to grabbing
576
+ # session._conn._conn if `.connection` is unavailable.
577
+ return session._conn._conn
578
+
579
+ # We require qmark-style parameters everywhere for consistency across different
580
+ # environments where SnowflakeConnections may be used.
581
+ snowflake.connector.paramstyle = "qmark"
582
+
583
+ # Otherwise, attempt to create a new connection from whatever credentials we
584
+ # have available.
585
+ st_secrets = self._secrets.to_dict()
586
+ try:
587
+ if len(st_secrets):
588
+ _LOGGER.info(
589
+ "Connect to Snowflake using the Streamlit secret defined under "
590
+ "[connections.snowflake]."
591
+ )
592
+ conn_kwargs = {**st_secrets, **kwargs}
593
+ return snowflake.connector.connect(**conn_kwargs)
594
+
595
+ # Use the default configuration as defined in https://docs.snowflake.com/en/developer-guide/python-connector/python-connector-connect#setting-a-default-connection
596
+ if self._connection_name == "snowflake":
597
+ _LOGGER.info(
598
+ "Connect to Snowflake using the default configuration as defined "
599
+ "in https://docs.snowflake.com/en/developer-guide/python-connector/python-connector-connect#setting-a-default-connection"
600
+ )
601
+ return snowflake.connector.connect()
602
+
603
+ return snowflake.connector.connect(**kwargs)
604
+ except SnowflakeError:
605
+ if not len(st_secrets) and not kwargs:
606
+ raise StreamlitAPIException(
607
+ "Missing Snowflake connection configuration. "
608
+ "Did you forget to set this in `secrets.toml`, a Snowflake configuration file, "
609
+ "or as kwargs to `st.connection`? "
610
+ "See the [SnowflakeConnection configuration documentation]"
611
+ "(https://docs.streamlit.io/st.connections.snowflakeconnection-configuration) "
612
+ "for more details and examples."
613
+ )
614
+ raise
615
+
616
+
617
+ class SnowflakeCallersRightsConnection(SnowflakeConnection):
618
+ """A caller's rights connection to Snowflake using the Snowflake Connector for Python.
619
+
620
+ This will only work when running on Snowpark Container Services or another
621
+ compatible platform.
622
+
623
+ See ``BaseSnowflakeConnection`` for complete docs.
624
+ """
625
+
626
+ @classmethod
627
+ def scope(cls) -> Literal["session"]:
628
+ """Returns ``"session"``.
629
+
630
+ Caller's rights Snowflake connections rely on per-session connection tokens and
631
+ therefore must be session-scoped.
632
+ """
633
+ return "session"
634
+
635
+ @classmethod
636
+ def _read_token_file(cls) -> str:
637
+ """Returns the contents of the Snowpark token file on disk."""
638
+ with open(SNOWPARK_CONNECTION_TOKEN_FILE) as token_file:
639
+ return token_file.read()
640
+
641
+ @classmethod
642
+ def _get_connection_params(cls) -> dict[str, str | bool]:
643
+ """Returns caller's rights connection parameters for the current session.
644
+
645
+ Raises
646
+ ------
647
+ StreamlitAPIException: if any Snowpark environment variables or connection
648
+ tokens are missing; or if this is called outside of a session context.
649
+ """
650
+ # Local import needed to avoid cycles.
651
+ from streamlit import context as st_context
652
+
653
+ # See Snowflake docs:
654
+ # https://docs.snowflake.com/en/developer-guide/snowpark-container-services/additional-considerations-services-jobs#configuring-caller-s-rights-for-your-service
655
+
656
+ # Base parameters, common to all connections.
657
+ params: dict[str, str | bool] = {
658
+ "authenticator": "oauth",
659
+ # OCSP checks do not work in Snowflake containers.
660
+ "ocsp_fail_open": True,
661
+ # We want to keep this alive, as the user token will expire fairly quickly
662
+ # - so we can't create a new session on expiration.
663
+ "client_session_keep_alive": True,
664
+ }
665
+ for param_name, env_var_name in (
666
+ ("account", "SNOWFLAKE_ACCOUNT"),
667
+ ("host", "SNOWFLAKE_HOST"),
668
+ ("database", "SNOWFLAKE_DATABASE"),
669
+ ("schema", "SNOWFLAKE_SCHEMA"),
670
+ ):
671
+ value = os.getenv(env_var_name)
672
+ if value is None:
673
+ raise StreamlitAPIException(
674
+ f"Environment variable `{env_var_name}` not found. Is this app "
675
+ "running in a Snowflake container environment?"
676
+ )
677
+ params[param_name] = value
678
+
679
+ # Validate the token file exists, and read it.
680
+ if not os.path.exists(SNOWPARK_CONNECTION_TOKEN_FILE):
681
+ raise StreamlitAPIException(
682
+ f"Token file `{SNOWPARK_CONNECTION_TOKEN_FILE}` not found. Is this app "
683
+ "running in a Snowflake container environment?"
684
+ )
685
+ login_token = cls._read_token_file()
686
+
687
+ # Validate the token header exists, and read it.
688
+ if SNOWPARK_USER_TOKEN_HEADER_NAME not in st_context.headers:
689
+ raise StreamlitAPIException(
690
+ "Token header not found. Is this app running with caller's "
691
+ "rights enabled, and is this connection being created in an app "
692
+ "execution thread?"
693
+ )
694
+ user_token = st_context.headers[SNOWPARK_USER_TOKEN_HEADER_NAME]
695
+
696
+ # Build the actual caller's rights token.
697
+ params["token"] = f"{login_token}.{user_token}"
698
+
699
+ return params
700
+
701
+ def _connect(self, **kwargs: Any) -> InternalSnowflakeConnection:
702
+ import snowflake.connector # type:ignore[import]
703
+
704
+ # We require qmark-style parameters everywhere for consistency across different
705
+ # environments where SnowflakeConnections may be used.
706
+ snowflake.connector.paramstyle = "qmark"
707
+
708
+ params = self._get_connection_params()
709
+
710
+ # Connect with the params we generated, overriding with user-specified params.
711
+ return snowflake.connector.connect(**{**params, **kwargs})
@@ -20,6 +20,7 @@ from typing import TYPE_CHECKING, Any, Final, TypeVar, overload
20
20
  from streamlit import config, logger
21
21
  from streamlit.dataframe_util import OptionSequence, convert_anything_to_list
22
22
  from streamlit.errors import StreamlitAPIException
23
+ from streamlit.runtime.state import get_session_state
23
24
  from streamlit.runtime.state.common import RegisterWidgetResult
24
25
  from streamlit.type_util import (
25
26
  check_python_comparable,
@@ -282,3 +283,100 @@ def create_mappings(
282
283
  formatted_options,
283
284
  formatted_option_to_option_mapping,
284
285
  )
286
+
287
+
288
+ def validate_and_sync_value_with_options(
289
+ current_value: T | None,
290
+ opt: Sequence[T],
291
+ default_index: int | None,
292
+ key: str | int | None,
293
+ ) -> tuple[T | None, bool]:
294
+ """Validate current value against options, resetting session state if invalid.
295
+
296
+ This function has a side-effect: if the value is not found in the options
297
+ and a key is provided, it will update session state with the new value.
298
+
299
+ Parameters
300
+ ----------
301
+ current_value
302
+ The current widget value to validate.
303
+ opt
304
+ The sequence of valid options.
305
+ default_index
306
+ The default index to reset to if value is invalid.
307
+ key
308
+ The widget key for session state updates.
309
+
310
+ Returns
311
+ -------
312
+ tuple[T | None, bool]
313
+ A tuple of (validated_value, value_was_reset).
314
+ """
315
+ if current_value is None:
316
+ return current_value, False
317
+
318
+ # Check if current value is still in the new options
319
+ try:
320
+ index_(opt, current_value)
321
+ return current_value, False
322
+ except ValueError:
323
+ # Value not in options - reset to default
324
+ if default_index is not None and len(opt) > 0:
325
+ new_value: T | None = opt[default_index]
326
+ else:
327
+ new_value = None
328
+
329
+ if key is not None:
330
+ # Update session_state so subsequent accesses in this run
331
+ # return the corrected value. Use reset_state_value to avoid
332
+ # the "cannot be modified after widget instantiated" error.
333
+ get_session_state().reset_state_value(str(key), new_value)
334
+
335
+ return new_value, True
336
+
337
+
338
+ def validate_and_sync_multiselect_value_with_options(
339
+ current_values: list[T] | list[T | str],
340
+ opt: Sequence[T],
341
+ key: str | int | None,
342
+ ) -> tuple[list[T] | list[T | str], bool]:
343
+ """Validate multiselect values against options, syncing session state if needed.
344
+
345
+ This function has a side-effect: if any values are filtered out and a key
346
+ is provided, it will update session state with the filtered list.
347
+
348
+ Unlike selectbox which resets to a default when the value is invalid,
349
+ multiselect filters out invalid values and keeps the valid ones.
350
+
351
+ Parameters
352
+ ----------
353
+ current_values
354
+ The current list of selected values to validate.
355
+ opt
356
+ The sequence of valid options.
357
+ key
358
+ The widget key for session state updates.
359
+
360
+ Returns
361
+ -------
362
+ tuple[list[T] | list[T | str], bool]
363
+ A tuple of (validated_values, values_were_filtered).
364
+ """
365
+ if not current_values:
366
+ return current_values, False
367
+
368
+ valid_values: list[T | str] = []
369
+ for value in current_values:
370
+ try:
371
+ index_(opt, value)
372
+ valid_values.append(value)
373
+ except ValueError: # noqa: PERF203
374
+ pass
375
+
376
+ if len(valid_values) == len(current_values):
377
+ return current_values, False
378
+
379
+ if key is not None:
380
+ get_session_state().reset_state_value(str(key), valid_values)
381
+
382
+ return valid_values, True
@@ -38,6 +38,7 @@ from streamlit.elements.lib.options_selector_utils import (
38
38
  create_mappings,
39
39
  get_default_indices,
40
40
  maybe_coerce_enum_sequence,
41
+ validate_and_sync_multiselect_value_with_options,
41
42
  )
42
43
  from streamlit.elements.lib.policies import (
43
44
  check_widget_policies,
@@ -493,15 +494,9 @@ class MultiSelectMixin:
493
494
  element_id = compute_and_register_element_id(
494
495
  widget_name,
495
496
  user_key=key,
496
- # Treat the provided key as the main identity. Only include
497
- # changes to the options, accept_new_options, and max_selections
498
- # in the identity computation as those can invalidate the
499
- # current selection.
500
497
  key_as_main_identity={
501
- "options",
502
498
  "max_selections",
503
499
  "accept_new_options",
504
- "format_func",
505
500
  },
506
501
  dg=self.dg,
507
502
  label=label,
@@ -554,8 +549,23 @@ class MultiSelectMixin:
554
549
  widget_state, options, indexable_options
555
550
  )
556
551
 
557
- if widget_state.value_changed:
558
- proto.raw_values[:] = serde.serialize(widget_state.value)
552
+ if accept_new_options:
553
+ # accept_new_options is True, so we keep the user-entered values.
554
+ current_values = widget_state.value
555
+ value_needs_reset = False
556
+ else:
557
+ # Validate the current values against the new options.
558
+ # If values are no longer valid (not in options), filter them out.
559
+ # This handles the case where options change dynamically and the
560
+ # previously selected values are no longer available.
561
+ current_values, value_needs_reset = (
562
+ validate_and_sync_multiselect_value_with_options(
563
+ widget_state.value, indexable_options, key
564
+ )
565
+ )
566
+
567
+ if value_needs_reset or widget_state.value_changed:
568
+ proto.raw_values[:] = serde.serialize(current_values)
559
569
  proto.set_value = True
560
570
 
561
571
  validate_width(width)
@@ -566,7 +576,7 @@ class MultiSelectMixin:
566
576
 
567
577
  self.dg._enqueue(widget_name, proto, layout_config=layout_config)
568
578
 
569
- return widget_state.value
579
+ return current_values
570
580
 
571
581
  @property
572
582
  def dg(self) -> DeltaGenerator:
@@ -37,6 +37,7 @@ from streamlit.elements.lib.options_selector_utils import (
37
37
  create_mappings,
38
38
  index_,
39
39
  maybe_coerce_enum,
40
+ validate_and_sync_value_with_options,
40
41
  )
41
42
  from streamlit.elements.lib.policies import (
42
43
  check_widget_policies,
@@ -595,30 +596,17 @@ class SelectboxMixin:
595
596
  )
596
597
  widget_state = maybe_coerce_enum(widget_state, options, opt)
597
598
 
598
- # Validate the current value against the new options.
599
- # If the value is no longer valid (not in options), reset to default.
600
- # This handles the case where options change dynamically and the
601
- # previously selected value is no longer available.
602
- current_value = widget_state.value
603
- value_needs_reset = False
604
-
605
- if current_value is not None and not accept_new_options:
606
- # Check if current value is still in the new options
607
- try:
608
- index_(opt, current_value)
609
- except ValueError:
610
- # Value not in options - reset to default.
611
- value_needs_reset = True
612
- if index is not None and len(opt) > 0:
613
- current_value = opt[index]
614
- else:
615
- current_value = None
616
-
617
- # Update session_state so subsequent accesses in this run
618
- # return the corrected value. Use reset_state_value to avoid
619
- # the "cannot be modified after widget instantiated" error.
620
- if key is not None:
621
- get_session_state().reset_state_value(key, current_value)
599
+ if accept_new_options:
600
+ current_value = widget_state.value
601
+ value_needs_reset = False
602
+ else:
603
+ # Validate the current value against the new options.
604
+ # If the value is no longer valid (not in options), reset to default.
605
+ # This handles the case where options change dynamically and the
606
+ # previously selected value is no longer available.
607
+ current_value, value_needs_reset = validate_and_sync_value_with_options(
608
+ widget_state.value, opt, index, key
609
+ )
622
610
 
623
611
  if value_needs_reset or widget_state.value_changed:
624
612
  serialized_value = serde.serialize(current_value)
@@ -15,7 +15,7 @@ _sym_db = _symbol_database.Default()
15
15
  from streamlit.proto import PageProfile_pb2 as streamlit_dot_proto_dot_PageProfile__pb2
16
16
 
17
17
 
18
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"streamlit/proto/MetricsEvent.proto\x1a!streamlit/proto/PageProfile.proto\"\xbf\x07\n\x0cMetricsEvent\x12\r\n\x05\x65vent\x18\x01 \x01(\t\x12\x14\n\x0c\x61nonymous_id\x18\x02 \x01(\t\x12\x15\n\rmachine_id_v3\x18\x03 \x01(\t\x12\x15\n\rmachine_id_v4\x18) \x01(\t\x12\x13\n\x0breport_hash\x18\x04 \x01(\t\x12\x0b\n\x03\x64\x65v\x18\x05 \x01(\x08\x12\x0e\n\x06source\x18\x06 \x01(\t\x12\x19\n\x11streamlit_version\x18\x07 \x01(\t\x12\x10\n\x08is_hello\x18\x08 \x01(\x08\x12\x0e\n\x06\x61pp_id\x18! \x01(\t\x12\x12\n\nsession_id\x18# \x01(\t\x12\x16\n\x0epython_version\x18$ \x01(\t\x12\x11\n\tserver_os\x18* \x01(\t\x12\x13\n\x0bhas_display\x18+ \x01(\x08\x12\x14\n\x0cis_webdriver\x18, \x01(\x08\x12\x11\n\thosted_at\x18\t \x01(\t\x12\r\n\x05owner\x18\n \x01(\t\x12\x0c\n\x04repo\x18\x0b \x01(\t\x12\x0e\n\x06\x62ranch\x18\x0c \x01(\t\x12\x13\n\x0bmain_module\x18\r \x01(\t\x12\x12\n\ncreator_id\x18\x0e \x01(\t\x12\x18\n\x10\x63ontext_page_url\x18\x0f \x01(\t\x12\x1a\n\x12\x63ontext_page_title\x18\x10 \x01(\t\x12\x19\n\x11\x63ontext_page_path\x18\x11 \x01(\t\x12\x1d\n\x15\x63ontext_page_referrer\x18\x12 \x01(\t\x12\x1b\n\x13\x63ontext_page_search\x18\x13 \x01(\t\x12\x16\n\x0e\x63ontext_locale\x18\x14 \x01(\t\x12\x1a\n\x12\x63ontext_user_agent\x18\x15 \x01(\t\x12\r\n\x05label\x18\x16 \x01(\t\x12\x1a\n\x08\x63ommands\x18\x17 \x03(\x0b\x32\x08.Command\x12\x11\n\texec_time\x18\x18 \x01(\x03\x12\x11\n\tprep_time\x18\x19 \x01(\x03\x12\x0e\n\x06\x63onfig\x18\x1a \x03(\t\x12\x1a\n\x12uncaught_exception\x18\x1b \x01(\t\x12\x14\n\x0c\x61ttributions\x18\x1c \x03(\t\x12\n\n\x02os\x18\x1d \x01(\t\x12\x10\n\x08timezone\x18\x1e \x01(\t\x12\x10\n\x08headless\x18\x1f \x01(\x08\x12\x17\n\x0fis_fragment_run\x18 \x01(\x08\x12\x10\n\x08numPages\x18\" \x01(\x03\x12\x18\n\x10page_script_hash\x18% \x01(\t\x12\x14\n\x0c\x61\x63tive_theme\x18& \x01(\t\x12\x17\n\x0ftotal_load_time\x18\' \x01(\x03\x12\"\n\x0c\x62rowser_info\x18( \x01(\x0b\x32\x0c.BrowserInfo\"]\n\x0b\x42rowserInfo\x12\x14\n\x0c\x62rowser_name\x18\x01 \x01(\t\x12\x17\n\x0f\x62rowser_version\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65vice_type\x18\x03 \x01(\t\x12\n\n\x02os\x18\x04 \x01(\tB1\n\x1c\x63om.snowflake.apps.streamlitB\x11MetricsEventProtob\x06proto3')
18
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"streamlit/proto/MetricsEvent.proto\x1a!streamlit/proto/PageProfile.proto\"\xd4\x07\n\x0cMetricsEvent\x12\r\n\x05\x65vent\x18\x01 \x01(\t\x12\x14\n\x0c\x61nonymous_id\x18\x02 \x01(\t\x12\x15\n\rmachine_id_v3\x18\x03 \x01(\t\x12\x15\n\rmachine_id_v4\x18) \x01(\t\x12\x13\n\x0breport_hash\x18\x04 \x01(\t\x12\x0b\n\x03\x64\x65v\x18\x05 \x01(\x08\x12\x0e\n\x06source\x18\x06 \x01(\t\x12\x19\n\x11streamlit_version\x18\x07 \x01(\t\x12\x10\n\x08is_hello\x18\x08 \x01(\x08\x12\x0e\n\x06\x61pp_id\x18! \x01(\t\x12\x12\n\nsession_id\x18# \x01(\t\x12\x16\n\x0epython_version\x18$ \x01(\t\x12\x11\n\tserver_os\x18* \x01(\t\x12\x13\n\x0bhas_display\x18+ \x01(\x08\x12\x14\n\x0cis_webdriver\x18, \x01(\x08\x12\x11\n\thosted_at\x18\t \x01(\t\x12\r\n\x05owner\x18\n \x01(\t\x12\x0c\n\x04repo\x18\x0b \x01(\t\x12\x0e\n\x06\x62ranch\x18\x0c \x01(\t\x12\x13\n\x0bmain_module\x18\r \x01(\t\x12\x12\n\ncreator_id\x18\x0e \x01(\t\x12\x18\n\x10\x63ontext_page_url\x18\x0f \x01(\t\x12\x1a\n\x12\x63ontext_page_title\x18\x10 \x01(\t\x12\x19\n\x11\x63ontext_page_path\x18\x11 \x01(\t\x12\x1d\n\x15\x63ontext_page_referrer\x18\x12 \x01(\t\x12\x1b\n\x13\x63ontext_page_search\x18\x13 \x01(\t\x12\x16\n\x0e\x63ontext_locale\x18\x14 \x01(\t\x12\x1a\n\x12\x63ontext_user_agent\x18\x15 \x01(\t\x12\r\n\x05label\x18\x16 \x01(\t\x12\x1a\n\x08\x63ommands\x18\x17 \x03(\x0b\x32\x08.Command\x12\x11\n\texec_time\x18\x18 \x01(\x03\x12\x11\n\tprep_time\x18\x19 \x01(\x03\x12\x0e\n\x06\x63onfig\x18\x1a \x03(\t\x12\x1a\n\x12uncaught_exception\x18\x1b \x01(\t\x12\x14\n\x0c\x61ttributions\x18\x1c \x03(\t\x12\n\n\x02os\x18\x1d \x01(\t\x12\x10\n\x08timezone\x18\x1e \x01(\t\x12\x10\n\x08headless\x18\x1f \x01(\x08\x12\x17\n\x0fis_fragment_run\x18 \x01(\x08\x12\x10\n\x08numPages\x18\" \x01(\x03\x12\x18\n\x10page_script_hash\x18% \x01(\t\x12\x14\n\x0c\x61\x63tive_theme\x18& \x01(\t\x12\x17\n\x0ftotal_load_time\x18\' \x01(\x03\x12\"\n\x0c\x62rowser_info\x18( \x01(\x0b\x32\x0c.BrowserInfo\x12\x13\n\x0bserver_mode\x18- \x01(\t\"]\n\x0b\x42rowserInfo\x12\x14\n\x0c\x62rowser_name\x18\x01 \x01(\t\x12\x17\n\x0f\x62rowser_version\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65vice_type\x18\x03 \x01(\t\x12\n\n\x02os\x18\x04 \x01(\tB1\n\x1c\x63om.snowflake.apps.streamlitB\x11MetricsEventProtob\x06proto3')
19
19
 
20
20
  _globals = globals()
21
21
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -24,7 +24,7 @@ if not _descriptor._USE_C_DESCRIPTORS:
24
24
  _globals['DESCRIPTOR']._loaded_options = None
25
25
  _globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\021MetricsEventProto'
26
26
  _globals['_METRICSEVENT']._serialized_start=74
27
- _globals['_METRICSEVENT']._serialized_end=1033
28
- _globals['_BROWSERINFO']._serialized_start=1035
29
- _globals['_BROWSERINFO']._serialized_end=1128
27
+ _globals['_METRICSEVENT']._serialized_end=1054
28
+ _globals['_BROWSERINFO']._serialized_start=1056
29
+ _globals['_BROWSERINFO']._serialized_end=1149
30
30
  # @@protoc_insertion_point(module_scope)