streamlit-nightly 1.52.3.dev20260111__py3-none-any.whl → 1.52.3.dev20260113__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 +1 -1
- streamlit/auth_util.py +25 -2
- streamlit/cli_util.py +1 -1
- streamlit/components/v2/bidi_component/main.py +2 -2
- streamlit/connections/snowflake_connection.py +1 -1
- streamlit/dataframe_util.py +1 -3
- streamlit/elements/arrow.py +5 -1
- streamlit/elements/lib/color_util.py +1 -1
- streamlit/elements/lib/image_utils.py +1 -1
- streamlit/elements/vega_charts.py +4 -1
- streamlit/elements/widgets/multiselect.py +1 -1
- streamlit/elements/widgets/time_widgets.py +1 -1
- streamlit/elements/write.py +1 -2
- streamlit/errors.py +2 -0
- streamlit/external/langchain/streamlit_callback_handler.py +1 -1
- streamlit/proto/Alert_pb2.pyi +31 -31
- streamlit/proto/AppPage_pb2.pyi +30 -30
- streamlit/proto/ArrowData_pb2.pyi +15 -15
- streamlit/proto/ArrowNamedDataSet_pb2.pyi +25 -25
- streamlit/proto/ArrowVegaLiteChart_pb2.pyi +45 -45
- streamlit/proto/Arrow_pb2.pyi +126 -97
- streamlit/proto/AudioInput_pb2.pyi +39 -39
- streamlit/proto/Audio_pb2.pyi +39 -39
- streamlit/proto/AuthRedirect_pb2.pyi +15 -15
- streamlit/proto/AutoRerun_pb2.pyi +18 -18
- streamlit/proto/BackMsg_pb2.pyi +64 -64
- streamlit/proto/Balloons_pb2.pyi +15 -15
- streamlit/proto/BidiComponent_pb2.pyi +100 -100
- streamlit/proto/Block_pb2.pyi +295 -264
- streamlit/proto/BokehChart_pb2.pyi +21 -21
- streamlit/proto/ButtonGroup_pb2.pyi +96 -96
- streamlit/proto/ButtonLikeIconPosition_pb2.pyi +12 -12
- streamlit/proto/Button_pb2.pyi +63 -50
- streamlit/proto/CameraInput_pb2.pyi +34 -34
- streamlit/proto/ChatInput_pb2.pyi +63 -63
- streamlit/proto/Checkbox_pb2.pyi +49 -49
- streamlit/proto/ClientState_pb2.pyi +85 -85
- streamlit/proto/Code_pb2.pyi +41 -28
- streamlit/proto/ColorPicker_pb2.pyi +43 -43
- streamlit/proto/Common_pb2.pyi +175 -175
- streamlit/proto/Components_pb2.pyi +110 -110
- streamlit/proto/DataFrame_pb2.pyi +209 -209
- streamlit/proto/DateInput_pb2.pyi +59 -59
- streamlit/proto/DateTimeInput_pb2.pyi +62 -62
- streamlit/proto/DeckGlJsonChart_pb2.pyi +91 -56
- streamlit/proto/Delta_pb2.pyi +44 -44
- streamlit/proto/DocString_pb2.pyi +51 -51
- streamlit/proto/DownloadButton_pb2.pyi +59 -59
- streamlit/proto/Element_pb2.pyi +319 -319
- streamlit/proto/Empty_pb2.pyi +10 -10
- streamlit/proto/Exception_pb2.pyi +37 -37
- streamlit/proto/Favicon_pb2.pyi +15 -15
- streamlit/proto/FileUploader_pb2.pyi +49 -49
- streamlit/proto/ForwardMsg_pb2.pyi +176 -170
- streamlit/proto/GapSize_pb2.pyi +23 -23
- streamlit/proto/GitInfo_pb2.pyi +37 -37
- streamlit/proto/GraphVizChart_pb2.pyi +38 -25
- streamlit/proto/Heading_pb2.pyi +30 -30
- streamlit/proto/HeightConfig_pb2.pyi +31 -31
- streamlit/proto/Html_pb2.pyi +18 -18
- streamlit/proto/IFrame_pb2.pyi +76 -47
- streamlit/proto/Image_pb2.pyi +49 -36
- streamlit/proto/Json_pb2.pyi +25 -25
- streamlit/proto/LabelVisibilityMessage_pb2.pyi +18 -18
- streamlit/proto/LinkButton_pb2.pyi +43 -43
- streamlit/proto/Logo_pb2.pyi +24 -24
- streamlit/proto/Markdown_pb2.pyi +30 -30
- streamlit/proto/Metric_pb2.pyi +59 -59
- streamlit/proto/MetricsEvent_pb2.pyi +171 -171
- streamlit/proto/MultiSelect_pb2.pyi +72 -66
- streamlit/proto/NamedDataSet_pb2.pyi +25 -25
- streamlit/proto/Navigation_pb2.pyi +35 -35
- streamlit/proto/NewSession_pb2.pyi +511 -498
- streamlit/proto/NumberInput_pb2.pyi +79 -79
- streamlit/proto/PageConfig_pb2.pyi +71 -71
- streamlit/proto/PageInfo_pb2.pyi +15 -15
- streamlit/proto/PageLink_pb2.pyi +47 -47
- streamlit/proto/PageNotFound_pb2.pyi +15 -15
- streamlit/proto/PageProfile_pb2.pyi +85 -85
- streamlit/proto/PagesChanged_pb2.pyi +19 -19
- streamlit/proto/ParentMessage_pb2.pyi +15 -15
- streamlit/proto/PlotlyChart_pb2.pyi +79 -64
- streamlit/proto/Progress_pb2.pyi +18 -18
- streamlit/proto/Radio_pb2.pyi +62 -62
- streamlit/proto/RootContainer_pb2.pyi +12 -12
- streamlit/proto/Selectbox_pb2.pyi +80 -70
- streamlit/proto/SessionEvent_pb2.pyi +27 -27
- streamlit/proto/SessionStatus_pb2.pyi +18 -18
- streamlit/proto/Skeleton_pb2.pyi +25 -25
- streamlit/proto/Slider_pb2.pyi +74 -74
- streamlit/proto/Snow_pb2.pyi +15 -15
- streamlit/proto/Space_pb2.pyi +10 -10
- streamlit/proto/Spinner_pb2.pyi +21 -21
- streamlit/proto/TextAlignmentConfig_pb2.pyi +18 -18
- streamlit/proto/TextArea_pb2.pyi +72 -59
- streamlit/proto/TextInput_pb2.pyi +67 -67
- streamlit/proto/Text_pb2.pyi +18 -18
- streamlit/proto/TimeInput_pb2.pyi +52 -52
- streamlit/proto/Toast_pb2.pyi +25 -25
- streamlit/proto/Transient_pb2.pyi +19 -19
- streamlit/proto/VegaLiteChart_pb2.pyi +32 -32
- streamlit/proto/Video_pb2.pyi +65 -65
- streamlit/proto/WidgetStates_pb2.pyi +91 -85
- streamlit/proto/WidthConfig_pb2.pyi +31 -31
- streamlit/proto/openmetrics_data_model_pb2.pyi +269 -269
- streamlit/runtime/app_session.py +1 -1
- streamlit/runtime/credentials.py +2 -2
- streamlit/runtime/metrics_util.py +3 -3
- streamlit/runtime/secrets.py +1 -1
- streamlit/runtime/stats.py +1 -3
- streamlit/static/index.html +1 -1
- streamlit/static/manifest.json +296 -296
- streamlit/static/static/js/{ErrorOutline.esm.D0HiUB0L.js → ErrorOutline.esm.BjVqd_6R.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.BuUS-pfi.js → FileDownload.esm.DJCSsghl.js} +1 -1
- streamlit/static/static/js/{FileHelper.Pf8URFng.js → FileHelper.C---TH7o.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.By4vKj6A.js → FormClearHelper.C-6BC487.js} +1 -1
- streamlit/static/static/js/{InputInstructions.BiaGyIXk.js → InputInstructions.sxc3InCI.js} +1 -1
- streamlit/static/static/js/{Particles.2-EdjYhR.js → Particles.S8yD7iW-.js} +1 -1
- streamlit/static/static/js/{ProgressBar.Dgbh0B0d.js → ProgressBar.BiYsyZCC.js} +1 -1
- streamlit/static/static/js/{StreamlitSyntaxHighlighter.DSl8Wr3R.js → StreamlitSyntaxHighlighter.9jZF8jX1.js} +1 -1
- streamlit/static/static/js/{TableChart.esm.MOwyTUPh.js → TableChart.esm.BdA4Q1rZ.js} +1 -1
- streamlit/static/static/js/{Toolbar.CowuXIFr.js → Toolbar.B9DaaDfN.js} +1 -1
- streamlit/static/static/js/{WidgetLabelHelpIconInline.BdGIJQe4.js → WidgetLabelHelpIconInline.DxODTLS2.js} +1 -1
- streamlit/static/static/js/{base-input.CHPo5oJ1.js → base-input.Gf1cKuQR.js} +1 -1
- streamlit/static/static/js/{checkbox.Dkt2TQVS.js → checkbox.CnoNruf3.js} +1 -1
- streamlit/static/static/js/{createDownloadLinkElement.BaE-_v8I.js → createDownloadLinkElement.B48AepiL.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.C1ncL-Nr.js → data-grid-overlay-editor.Cmdq9aqU.js} +1 -1
- streamlit/static/static/js/{downloader.yaq2AzD9.js → downloader.CQLoQdMX.js} +1 -1
- streamlit/static/static/js/{embed.DJJvCVz2.js → embed.oKwocwU8.js} +1 -1
- streamlit/static/static/js/{es6.D2jK98VU.js → es6.BRxlY_y5.js} +2 -2
- streamlit/static/static/js/{formatNumber.Cxr2q_Sk.js → formatNumber.DaagZyZe.js} +1 -1
- streamlit/static/static/js/{iconPosition.5dHEZYw2.js → iconPosition.Q3hNvmK4.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.Cedt4qbc.js → iframeResizer.contentWindow.B6EBvI9L.js} +1 -1
- streamlit/static/static/js/{index.DaITTdfQ.js → index.19_qtO6t.js} +1 -1
- streamlit/static/static/js/{index._nL4Yjdr.js → index.43b777iP.js} +1 -1
- streamlit/static/static/js/{index.P-CMMGUY.js → index.B03eQZoH.js} +1 -1
- streamlit/static/static/js/{index.D2EVLt1U.js → index.B9kZB0o1.js} +1 -1
- streamlit/static/static/js/{index.BkDplL5I.js → index.BAI9aHCq.js} +1 -1
- streamlit/static/static/js/{index.CT9jvPcD.js → index.BF23fbfs.js} +1 -1
- streamlit/static/static/js/{index.TO9vodwr.js → index.BGBTkulf.js} +1 -1
- streamlit/static/static/js/{index.01VsD2h1.js → index.BRfGUOQ-.js} +5 -5
- streamlit/static/static/js/{index.D6ea3OJl.js → index.BVT89mQw.js} +1 -1
- streamlit/static/static/js/{index.BHMoYAbd.js → index.BXEC4cf3.js} +1 -1
- streamlit/static/static/js/{index.B6EliwN_.js → index.BbSFVZ3p.js} +1 -1
- streamlit/static/static/js/{index.B7EzT2pL.js → index.BkSwGJoh.js} +1 -1
- streamlit/static/static/js/{index.B6Uhb_NP.js → index.BnfTPrHb.js} +1 -1
- streamlit/static/static/js/{index.qzz9PjCO.js → index.BoX8d5rK.js} +1 -1
- streamlit/static/static/js/{index.Bb9kjc_v.js → index.Boa0Egng.js} +1 -1
- streamlit/static/static/js/{index.CjQo7CUO.js → index.BzwlrgZO.js} +1 -1
- streamlit/static/static/js/{index.Ba6hzYdl.js → index.C0fSEz-3.js} +1 -1
- streamlit/static/static/js/{index.B2TDaHdI.js → index.CCFwVy90.js} +1 -1
- streamlit/static/static/js/{index.Dt0Psatx.js → index.CCQ5p_WC.js} +1 -1
- streamlit/static/static/js/{index.DeGjj5Xy.js → index.CFCBhOfx.js} +1 -1
- streamlit/static/static/js/{index.DredtYc0.js → index.CIbgt5wY.js} +1 -1
- streamlit/static/static/js/{index.CD8IIWcc.js → index.CJ4oJe0V.js} +1 -1
- streamlit/static/static/js/{index.6_D2Y2jA.js → index.CP-hoxJM.js} +1 -1
- streamlit/static/static/js/{index.BXCQzqUL.js → index.CSfsEKCF.js} +1 -1
- streamlit/static/static/js/{index.C8PH2B2k.js → index.CVlg41MB.js} +1 -1
- streamlit/static/static/js/{index.BVit6ClT.js → index.CYE7b5Du.js} +1 -1
- streamlit/static/static/js/{index.DKUtJ1wC.js → index.Ca7MUNWJ.js} +1 -1
- streamlit/static/static/js/index.CrPjcPY1.js +1 -0
- streamlit/static/static/js/{index.BMPclSge.js → index.CvB9JBqS.js} +5 -5
- streamlit/static/static/js/{index.BCCeRfnu.js → index.CvIqsWy1.js} +1 -1
- streamlit/static/static/js/{index.wLJVkoPD.js → index.D1pK_Vw2.js} +1 -1
- streamlit/static/static/js/{index.B0GsKOuI.js → index.D6X2coHR.js} +1 -1
- streamlit/static/static/js/{index.B4x2O71H.js → index.DGYHxruh.js} +1 -1
- streamlit/static/static/js/{index.DcKOiCiE.js → index.DJ7P09eb.js} +1 -1
- streamlit/static/static/js/{index.CcHnYd9w.js → index.Dh5SAThV.js} +1 -1
- streamlit/static/static/js/{index.BFopzcDu.js → index.Fu73QtkD.js} +1 -1
- streamlit/static/static/js/{index.CIlqaESj.js → index.KN1VmyYN.js} +1 -1
- streamlit/static/static/js/{index.B9DrCSR6.js → index.KtjGDGY5.js} +1 -1
- streamlit/static/static/js/{index.DLB_Wwth.js → index.OpATzEaW.js} +1 -1
- streamlit/static/static/js/{index.CcJEaOpw.js → index.QHnxuesF.js} +1 -1
- streamlit/static/static/js/{index.1djeb6e0.js → index.QTaWooav.js} +1 -1
- streamlit/static/static/js/{index.BgVtKHgk.js → index.WXybx2Xq.js} +1 -1
- streamlit/static/static/js/{index.DtGneC7j.js → index.Xg-Qttib.js} +1 -1
- streamlit/static/static/js/{index.Dewn3Ni9.js → index.j4fnjyHo.js} +1 -1
- streamlit/static/static/js/{index.CAobVzMK.js → index.na9UBuse.js} +1 -1
- streamlit/static/static/js/{index.D2v1x0i_.js → index.pU9mQeVC.js} +1 -1
- streamlit/static/static/js/{index.DbTMA1_Q.js → index.slgxPafU.js} +1 -1
- streamlit/static/static/js/{index.DozBVd6-.js → index.whRT3Vm3.js} +1 -1
- streamlit/static/static/js/{input.27t-DftI.js → input.CPzINTl-.js} +1 -1
- streamlit/static/static/js/{main.BEfv2Y8-.js → main.DSPn8dUe.js} +1 -1
- streamlit/static/static/js/{memory.CaZBVQ_1.js → memory.CfD8IGoU.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.CAIp-3oo.js → number-overlay-editor.4Ae0qegV.js} +1 -1
- streamlit/static/static/js/{pandasStylerUtils.BY9qaz81.js → pandasStylerUtils.D2EjZ7k6.js} +1 -1
- streamlit/static/static/js/{sandbox.BJUaaWFJ.js → sandbox.C6vcPIm0.js} +1 -1
- streamlit/static/static/js/{styled-components.DQsMkvXn.js → styled-components.BBmp8buj.js} +1 -1
- streamlit/static/static/js/{throttle.DSR3q89S.js → throttle.BPcPpy-S.js} +1 -1
- streamlit/static/static/js/{timepicker.gie5YwtP.js → timepicker.ryzkTs2C.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.C9lVwnAo.js → toConsumableArray.Dg1nDaB_.js} +1 -1
- streamlit/static/static/js/uniqueId.BFHzT5KQ.js +1 -0
- streamlit/static/static/js/{useBasicWidgetState.DrTKs46R.js → useBasicWidgetState.A4U5lzAm.js} +1 -1
- streamlit/static/static/js/{useIntlLocale.CmSionuT.js → useIntlLocale.DWJgLlNz.js} +1 -1
- streamlit/static/static/js/{useTextInputAutoExpand.D7lViJSu.js → useTextInputAutoExpand.BrBonw8t.js} +1 -1
- streamlit/static/static/js/{useUpdateUiValue.Ct3CJQBQ.js → useUpdateUiValue.BkOWyNVX.js} +1 -1
- streamlit/static/static/js/{useWaveformController.D-KQLpLI.js → useWaveformController.CBlvXlgZ.js} +1 -1
- streamlit/static/static/js/{withCalculatedWidth.CD0pPoZr.js → withCalculatedWidth.D4cpOyNe.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.Ch22PgdD.js → withFullScreenWrapper.BMim3w94.js} +1 -1
- streamlit/testing/v1/app_test.py +1 -1
- streamlit/user_info.py +6 -4
- streamlit/web/server/browser_websocket_handler.py +2 -2
- streamlit/web/server/oauth_authlib_routes.py +97 -20
- streamlit/web/server/starlette/starlette_routes.py +1 -3
- streamlit/web/server/stats_request_handler.py +1 -3
- {streamlit_nightly-1.52.3.dev20260111.dist-info → streamlit_nightly-1.52.3.dev20260113.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.52.3.dev20260111.dist-info → streamlit_nightly-1.52.3.dev20260113.dist-info}/RECORD +211 -211
- streamlit/static/static/js/index.i_eQw7NS.js +0 -1
- streamlit/static/static/js/uniqueId.BdEQNrWF.js +0 -1
- {streamlit_nightly-1.52.3.dev20260111.data → streamlit_nightly-1.52.3.dev20260113.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.52.3.dev20260111.dist-info → streamlit_nightly-1.52.3.dev20260113.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.52.3.dev20260111.dist-info → streamlit_nightly-1.52.3.dev20260113.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.52.3.dev20260111.dist-info → streamlit_nightly-1.52.3.dev20260113.dist-info}/top_level.txt +0 -0
streamlit/__init__.py
CHANGED
|
@@ -307,5 +307,5 @@ experimental_set_query_params = _deprecate_func_name(
|
|
|
307
307
|
# make it possible to call streamlit.components.v1.html etc. by importing it here
|
|
308
308
|
# import in the very end to avoid partially-initialized module import errors, because
|
|
309
309
|
# streamlit.components.v1 also uses some streamlit imports
|
|
310
|
-
import streamlit.components.v1
|
|
310
|
+
import streamlit.components.v1 # noqa: F401
|
|
311
311
|
import streamlit.components.v2 # noqa: F401
|
streamlit/auth_util.py
CHANGED
|
@@ -19,6 +19,7 @@ import re
|
|
|
19
19
|
from collections.abc import Callable, Mapping
|
|
20
20
|
from datetime import datetime, timedelta, timezone
|
|
21
21
|
from typing import TYPE_CHECKING, Any, Final, TypedDict, cast
|
|
22
|
+
from urllib.parse import urlparse
|
|
22
23
|
|
|
23
24
|
from streamlit import config
|
|
24
25
|
from streamlit.errors import StreamlitAuthError
|
|
@@ -92,8 +93,8 @@ def get_signing_secret() -> str:
|
|
|
92
93
|
|
|
93
94
|
|
|
94
95
|
def get_secrets_auth_section() -> AttrDict:
|
|
95
|
-
auth_section = AttrDict({})
|
|
96
96
|
"""Get the 'auth' section of the secrets.toml."""
|
|
97
|
+
auth_section = AttrDict({})
|
|
97
98
|
if secrets_singleton.load_if_toml_exists():
|
|
98
99
|
auth_section = cast("AttrDict", secrets_singleton.get("auth", AttrDict({})))
|
|
99
100
|
|
|
@@ -125,6 +126,28 @@ def get_expose_tokens_config() -> list[str]:
|
|
|
125
126
|
return res
|
|
126
127
|
|
|
127
128
|
|
|
129
|
+
def get_redirect_uri(auth_section: AttrDict) -> str | None:
|
|
130
|
+
"""Get the redirect_uri from auth_section - filling in port number if needed."""
|
|
131
|
+
|
|
132
|
+
if "redirect_uri" not in auth_section:
|
|
133
|
+
return None
|
|
134
|
+
|
|
135
|
+
redirect_uri: str = auth_section["redirect_uri"]
|
|
136
|
+
if "{port}" in redirect_uri:
|
|
137
|
+
redirect_uri = redirect_uri.replace(
|
|
138
|
+
"{port}", str(config.get_option("server.port"))
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
try:
|
|
142
|
+
redirect_uri_parsed = urlparse(redirect_uri)
|
|
143
|
+
except ValueError:
|
|
144
|
+
raise StreamlitAuthError(
|
|
145
|
+
f"Invalid redirect_uri: {redirect_uri}. Please check your configuration."
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
return redirect_uri_parsed.geturl()
|
|
149
|
+
|
|
150
|
+
|
|
128
151
|
def encode_provider_token(provider: str) -> str:
|
|
129
152
|
"""Returns a signed JWT token with the provider and expiration time."""
|
|
130
153
|
try:
|
|
@@ -353,7 +376,7 @@ def get_cookie_with_chunks(
|
|
|
353
376
|
chunk_name = f"{cookie_name}_{i + 1}"
|
|
354
377
|
chunk_value = get_single_cookie_fn(chunk_name)
|
|
355
378
|
if chunk_value is None:
|
|
356
|
-
_LOGGER.
|
|
379
|
+
_LOGGER.error("Missing chunk %d for cookie '%s'", i + 1, cookie_name)
|
|
357
380
|
return None
|
|
358
381
|
chunks.append(chunk_value)
|
|
359
382
|
|
streamlit/cli_util.py
CHANGED
|
@@ -60,7 +60,7 @@ def _open_browser_with_webbrowser(url: str) -> None:
|
|
|
60
60
|
|
|
61
61
|
def _open_browser_with_command(command: str, url: str) -> None:
|
|
62
62
|
cmd_line = [command, url]
|
|
63
|
-
with open(os.devnull, "w") as devnull:
|
|
63
|
+
with open(os.devnull, "w", encoding="utf-8") as devnull:
|
|
64
64
|
subprocess.Popen(cmd_line, stdout=devnull, stderr=subprocess.STDOUT) # noqa: S603
|
|
65
65
|
|
|
66
66
|
|
|
@@ -480,7 +480,7 @@ class BidiComponentMixin:
|
|
|
480
480
|
deserializer=serde.deserialize,
|
|
481
481
|
serializer=serde.serialize,
|
|
482
482
|
ctx=ctx,
|
|
483
|
-
callbacks=callbacks_by_event
|
|
483
|
+
callbacks=callbacks_by_event or None,
|
|
484
484
|
value_type="json_value",
|
|
485
485
|
presenter=presenter,
|
|
486
486
|
)
|
|
@@ -495,7 +495,7 @@ class BidiComponentMixin:
|
|
|
495
495
|
deserializer=deserialize_trigger_list, # always returns list or None
|
|
496
496
|
serializer=lambda v: json.dumps(v), # send dict as JSON
|
|
497
497
|
ctx=ctx,
|
|
498
|
-
callbacks=callbacks_by_event
|
|
498
|
+
callbacks=callbacks_by_event or None,
|
|
499
499
|
value_type="json_trigger_value",
|
|
500
500
|
)
|
|
501
501
|
|
|
@@ -635,7 +635,7 @@ class SnowflakeCallersRightsConnection(SnowflakeConnection):
|
|
|
635
635
|
@classmethod
|
|
636
636
|
def _read_token_file(cls) -> str:
|
|
637
637
|
"""Returns the contents of the Snowpark token file on disk."""
|
|
638
|
-
with open(SNOWPARK_CONNECTION_TOKEN_FILE) as token_file:
|
|
638
|
+
with open(SNOWPARK_CONNECTION_TOKEN_FILE, encoding="utf-8") as token_file:
|
|
639
639
|
return token_file.read()
|
|
640
640
|
|
|
641
641
|
@classmethod
|
streamlit/dataframe_util.py
CHANGED
|
@@ -1056,9 +1056,7 @@ def is_colum_type_arrow_incompatible(column: Series[Any] | Index[Any]) -> bool:
|
|
|
1056
1056
|
"""
|
|
1057
1057
|
from pandas.api.types import infer_dtype, is_dict_like, is_list_like
|
|
1058
1058
|
|
|
1059
|
-
if column.dtype.kind
|
|
1060
|
-
"c", # complex64, complex128, complex256
|
|
1061
|
-
]:
|
|
1059
|
+
if column.dtype.kind == "c": # complex64, complex128, complex256
|
|
1062
1060
|
return True
|
|
1063
1061
|
|
|
1064
1062
|
if str(column.dtype) in {
|
streamlit/elements/arrow.py
CHANGED
|
@@ -771,7 +771,11 @@ class ArrowMixin:
|
|
|
771
771
|
proto.id = compute_and_register_element_id(
|
|
772
772
|
"dataframe",
|
|
773
773
|
user_key=key,
|
|
774
|
-
|
|
774
|
+
# There are some edge cases where selections can become orphaned when the data changes
|
|
775
|
+
# - e.g. when rows get removed. The frontend can handle this without errors,
|
|
776
|
+
# but it might be a nice enhancement to automatically reset the backend & frontend
|
|
777
|
+
# selection state in this case.
|
|
778
|
+
key_as_main_identity={"selection_mode", "is_selection_activated"},
|
|
775
779
|
dg=self.dg,
|
|
776
780
|
data=proto.data,
|
|
777
781
|
width=width,
|
|
@@ -245,7 +245,7 @@ def _float_formatter(component: float, color: MaybeColor) -> float:
|
|
|
245
245
|
Anything too small will become 0.0, and anything too large will become 1.0.
|
|
246
246
|
"""
|
|
247
247
|
if isinstance(component, int):
|
|
248
|
-
component
|
|
248
|
+
component /= 255.0
|
|
249
249
|
|
|
250
250
|
if isinstance(component, float):
|
|
251
251
|
return min(1.0, max(component, 0.0))
|
|
@@ -265,7 +265,7 @@ def image_to_url(
|
|
|
265
265
|
|
|
266
266
|
if image.endswith(".svg") and os.path.isfile(image):
|
|
267
267
|
# Unpack local SVG image file to an SVG string
|
|
268
|
-
with open(image) as textfile:
|
|
268
|
+
with open(image, encoding="utf-8") as textfile:
|
|
269
269
|
image = textfile.read()
|
|
270
270
|
|
|
271
271
|
# Following regex allows svg image files to start either via a "<?xml...>" tag
|
|
@@ -2404,7 +2404,10 @@ class VegaChartsMixin:
|
|
|
2404
2404
|
vega_lite_proto.id = compute_and_register_element_id(
|
|
2405
2405
|
"arrow_vega_lite_chart",
|
|
2406
2406
|
user_key=key,
|
|
2407
|
-
|
|
2407
|
+
# There are some edge cases where selections can become orphaned when the data changes.
|
|
2408
|
+
# The frontend can handle this without errors, but it might be a nice enhancement
|
|
2409
|
+
# to automatically reset the backend & frontend selection state in this case.
|
|
2410
|
+
key_as_main_identity={"selection_mode"},
|
|
2408
2411
|
dg=self.dg,
|
|
2409
2412
|
vega_lite_spec=vega_lite_proto.spec,
|
|
2410
2413
|
# The data is either in vega_lite_proto.data.data
|
|
@@ -247,7 +247,7 @@ class MultiSelectMixin:
|
|
|
247
247
|
placeholder: str | None = None,
|
|
248
248
|
disabled: bool = False,
|
|
249
249
|
label_visibility: LabelVisibility = "visible",
|
|
250
|
-
accept_new_options:
|
|
250
|
+
accept_new_options: bool = False,
|
|
251
251
|
width: WidthWithoutContent = "stretch",
|
|
252
252
|
) -> list[T] | list[T | str]:
|
|
253
253
|
r"""Display a multiselect widget.
|
streamlit/elements/write.py
CHANGED
|
@@ -178,8 +178,7 @@ class WriteMixin:
|
|
|
178
178
|
|
|
179
179
|
def flush_stream_response() -> None:
|
|
180
180
|
"""Write the full response to the app."""
|
|
181
|
-
nonlocal streamed_response
|
|
182
|
-
nonlocal stream_container
|
|
181
|
+
nonlocal streamed_response, stream_container
|
|
183
182
|
|
|
184
183
|
if streamed_response and stream_container:
|
|
185
184
|
# Replace the stream_container element the full response
|
streamlit/errors.py
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
+
# ruff: noqa: RUF027 - We allow template strings in localizable exception messages instead of f-strings.
|
|
16
|
+
|
|
15
17
|
from __future__ import annotations
|
|
16
18
|
|
|
17
19
|
import os
|
|
@@ -129,7 +129,7 @@ class LLMThoughtLabeler:
|
|
|
129
129
|
input_str_len = min(MAX_TOOL_INPUT_STR_LENGTH, len(input_str))
|
|
130
130
|
input_str = input_str[:input_str_len]
|
|
131
131
|
if len(tool.input_str) > input_str_len:
|
|
132
|
-
input_str
|
|
132
|
+
input_str += "..."
|
|
133
133
|
input_str = input_str.replace("\n", " ")
|
|
134
134
|
return f"**{name}:** {input_str}"
|
|
135
135
|
|
streamlit/proto/Alert_pb2.pyi
CHANGED
|
@@ -17,36 +17,36 @@ See the License for the specific language governing permissions and
|
|
|
17
17
|
limitations under the License.
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
import
|
|
24
|
-
import
|
|
20
|
+
from google.protobuf import descriptor as _descriptor
|
|
21
|
+
from google.protobuf import message as _message
|
|
22
|
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
|
23
|
+
from streamlit.proto import WidthConfig_pb2 as _WidthConfig_pb2
|
|
24
|
+
import builtins as _builtins
|
|
25
25
|
import sys
|
|
26
|
-
import typing
|
|
26
|
+
import typing as _typing
|
|
27
27
|
|
|
28
28
|
if sys.version_info >= (3, 10):
|
|
29
|
-
|
|
29
|
+
from typing import TypeAlias as _TypeAlias
|
|
30
30
|
else:
|
|
31
|
-
import
|
|
31
|
+
from typing_extensions import TypeAlias as _TypeAlias
|
|
32
32
|
|
|
33
|
-
DESCRIPTOR:
|
|
33
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
34
34
|
|
|
35
|
-
@
|
|
36
|
-
class Alert(
|
|
35
|
+
@_typing.final
|
|
36
|
+
class Alert(_message.Message):
|
|
37
37
|
"""NOTE: This proto type is used by some external services so needs to remain
|
|
38
38
|
relatively stable. While it isn't entirely set in stone, changing it
|
|
39
39
|
may require a good amount of effort so should be avoided if possible.
|
|
40
40
|
"""
|
|
41
41
|
|
|
42
|
-
DESCRIPTOR:
|
|
42
|
+
DESCRIPTOR: _descriptor.Descriptor
|
|
43
43
|
|
|
44
44
|
class _Format:
|
|
45
|
-
ValueType =
|
|
46
|
-
V:
|
|
45
|
+
ValueType = _typing.NewType("ValueType", _builtins.int)
|
|
46
|
+
V: _TypeAlias = ValueType # noqa: Y015
|
|
47
47
|
|
|
48
|
-
class _FormatEnumTypeWrapper(
|
|
49
|
-
DESCRIPTOR:
|
|
48
|
+
class _FormatEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[Alert._Format.ValueType], _builtins.type):
|
|
49
|
+
DESCRIPTOR: _descriptor.EnumDescriptor
|
|
50
50
|
UNUSED: Alert._Format.ValueType # 0
|
|
51
51
|
"""Plain, fixed width text."""
|
|
52
52
|
ERROR: Alert._Format.ValueType # 1
|
|
@@ -72,29 +72,29 @@ class Alert(google.protobuf.message.Message):
|
|
|
72
72
|
SUCCESS: Alert.Format.ValueType # 4
|
|
73
73
|
"""Shows a success message."""
|
|
74
74
|
|
|
75
|
-
BODY_FIELD_NUMBER:
|
|
76
|
-
FORMAT_FIELD_NUMBER:
|
|
77
|
-
ICON_FIELD_NUMBER:
|
|
78
|
-
WIDTH_CONFIG_FIELD_NUMBER:
|
|
79
|
-
body:
|
|
75
|
+
BODY_FIELD_NUMBER: _builtins.int
|
|
76
|
+
FORMAT_FIELD_NUMBER: _builtins.int
|
|
77
|
+
ICON_FIELD_NUMBER: _builtins.int
|
|
78
|
+
WIDTH_CONFIG_FIELD_NUMBER: _builtins.int
|
|
79
|
+
body: _builtins.str
|
|
80
80
|
"""Content to display."""
|
|
81
81
|
format: Global___Alert.Format.ValueType
|
|
82
|
-
icon:
|
|
83
|
-
@property
|
|
84
|
-
def width_config(self) ->
|
|
82
|
+
icon: _builtins.str
|
|
83
|
+
@_builtins.property
|
|
84
|
+
def width_config(self) -> _WidthConfig_pb2.WidthConfig:
|
|
85
85
|
"""Indicates the width setting: "stetch", "content" or a pixel value."""
|
|
86
86
|
|
|
87
87
|
def __init__(
|
|
88
88
|
self,
|
|
89
89
|
*,
|
|
90
|
-
body:
|
|
90
|
+
body: _builtins.str = ...,
|
|
91
91
|
format: Global___Alert.Format.ValueType = ...,
|
|
92
|
-
icon:
|
|
93
|
-
width_config:
|
|
92
|
+
icon: _builtins.str = ...,
|
|
93
|
+
width_config: _WidthConfig_pb2.WidthConfig | None = ...,
|
|
94
94
|
) -> None: ...
|
|
95
|
-
_HasFieldArgType:
|
|
96
|
-
def HasField(self, field_name: _HasFieldArgType) ->
|
|
97
|
-
_ClearFieldArgType:
|
|
95
|
+
_HasFieldArgType: _TypeAlias = _typing.Literal["width_config", b"width_config"] # noqa: Y015
|
|
96
|
+
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
97
|
+
_ClearFieldArgType: _TypeAlias = _typing.Literal["body", b"body", "format", b"format", "icon", b"icon", "width_config", b"width_config"] # noqa: Y015
|
|
98
98
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
99
99
|
|
|
100
|
-
Global___Alert:
|
|
100
|
+
Global___Alert: _TypeAlias = Alert # noqa: Y015
|
streamlit/proto/AppPage_pb2.pyi
CHANGED
|
@@ -17,21 +17,21 @@ See the License for the specific language governing permissions and
|
|
|
17
17
|
limitations under the License.
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
import
|
|
20
|
+
from google.protobuf import descriptor as _descriptor
|
|
21
|
+
from google.protobuf import message as _message
|
|
22
|
+
import builtins as _builtins
|
|
23
23
|
import sys
|
|
24
|
-
import typing
|
|
24
|
+
import typing as _typing
|
|
25
25
|
|
|
26
26
|
if sys.version_info >= (3, 10):
|
|
27
|
-
|
|
27
|
+
from typing import TypeAlias as _TypeAlias
|
|
28
28
|
else:
|
|
29
|
-
import
|
|
29
|
+
from typing_extensions import TypeAlias as _TypeAlias
|
|
30
30
|
|
|
31
|
-
DESCRIPTOR:
|
|
31
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
32
32
|
|
|
33
|
-
@
|
|
34
|
-
class AppPage(
|
|
33
|
+
@_typing.final
|
|
34
|
+
class AppPage(_message.Message):
|
|
35
35
|
"""A page in the app. Includes both the name of the page as well as the full
|
|
36
36
|
path to the corresponding script file.
|
|
37
37
|
|
|
@@ -40,32 +40,32 @@ class AppPage(google.protobuf.message.Message):
|
|
|
40
40
|
may require a good amount of effort so should be avoided if possible.
|
|
41
41
|
"""
|
|
42
42
|
|
|
43
|
-
DESCRIPTOR:
|
|
43
|
+
DESCRIPTOR: _descriptor.Descriptor
|
|
44
44
|
|
|
45
|
-
PAGE_SCRIPT_HASH_FIELD_NUMBER:
|
|
46
|
-
PAGE_NAME_FIELD_NUMBER:
|
|
47
|
-
ICON_FIELD_NUMBER:
|
|
48
|
-
IS_DEFAULT_FIELD_NUMBER:
|
|
49
|
-
SECTION_HEADER_FIELD_NUMBER:
|
|
50
|
-
URL_PATHNAME_FIELD_NUMBER:
|
|
51
|
-
page_script_hash:
|
|
52
|
-
page_name:
|
|
53
|
-
icon:
|
|
54
|
-
is_default:
|
|
45
|
+
PAGE_SCRIPT_HASH_FIELD_NUMBER: _builtins.int
|
|
46
|
+
PAGE_NAME_FIELD_NUMBER: _builtins.int
|
|
47
|
+
ICON_FIELD_NUMBER: _builtins.int
|
|
48
|
+
IS_DEFAULT_FIELD_NUMBER: _builtins.int
|
|
49
|
+
SECTION_HEADER_FIELD_NUMBER: _builtins.int
|
|
50
|
+
URL_PATHNAME_FIELD_NUMBER: _builtins.int
|
|
51
|
+
page_script_hash: _builtins.str
|
|
52
|
+
page_name: _builtins.str
|
|
53
|
+
icon: _builtins.str
|
|
54
|
+
is_default: _builtins.bool
|
|
55
55
|
"""A feature for MPA v2 to inform the frontend what's the default page"""
|
|
56
|
-
section_header:
|
|
57
|
-
url_pathname:
|
|
56
|
+
section_header: _builtins.str
|
|
57
|
+
url_pathname: _builtins.str
|
|
58
58
|
def __init__(
|
|
59
59
|
self,
|
|
60
60
|
*,
|
|
61
|
-
page_script_hash:
|
|
62
|
-
page_name:
|
|
63
|
-
icon:
|
|
64
|
-
is_default:
|
|
65
|
-
section_header:
|
|
66
|
-
url_pathname:
|
|
61
|
+
page_script_hash: _builtins.str = ...,
|
|
62
|
+
page_name: _builtins.str = ...,
|
|
63
|
+
icon: _builtins.str = ...,
|
|
64
|
+
is_default: _builtins.bool = ...,
|
|
65
|
+
section_header: _builtins.str = ...,
|
|
66
|
+
url_pathname: _builtins.str = ...,
|
|
67
67
|
) -> None: ...
|
|
68
|
-
_ClearFieldArgType:
|
|
68
|
+
_ClearFieldArgType: _TypeAlias = _typing.Literal["icon", b"icon", "is_default", b"is_default", "page_name", b"page_name", "page_script_hash", b"page_script_hash", "section_header", b"section_header", "url_pathname", b"url_pathname"] # noqa: Y015
|
|
69
69
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
70
70
|
|
|
71
|
-
Global___AppPage:
|
|
71
|
+
Global___AppPage: _TypeAlias = AppPage # noqa: Y015
|
|
@@ -17,37 +17,37 @@ See the License for the specific language governing permissions and
|
|
|
17
17
|
limitations under the License.
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
import
|
|
20
|
+
from google.protobuf import descriptor as _descriptor
|
|
21
|
+
from google.protobuf import message as _message
|
|
22
|
+
import builtins as _builtins
|
|
23
23
|
import sys
|
|
24
|
-
import typing
|
|
24
|
+
import typing as _typing
|
|
25
25
|
|
|
26
26
|
if sys.version_info >= (3, 10):
|
|
27
|
-
|
|
27
|
+
from typing import TypeAlias as _TypeAlias
|
|
28
28
|
else:
|
|
29
|
-
import
|
|
29
|
+
from typing_extensions import TypeAlias as _TypeAlias
|
|
30
30
|
|
|
31
|
-
DESCRIPTOR:
|
|
31
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
32
32
|
|
|
33
|
-
@
|
|
34
|
-
class ArrowData(
|
|
33
|
+
@_typing.final
|
|
34
|
+
class ArrowData(_message.Message):
|
|
35
35
|
"""Data-only Arrow buffer. This intentionally excludes any UI- or element-
|
|
36
36
|
specific configuration that exists in Arrow.proto. Use this message when
|
|
37
37
|
only the serialized Arrow data is required.
|
|
38
38
|
"""
|
|
39
39
|
|
|
40
|
-
DESCRIPTOR:
|
|
40
|
+
DESCRIPTOR: _descriptor.Descriptor
|
|
41
41
|
|
|
42
|
-
DATA_FIELD_NUMBER:
|
|
43
|
-
data:
|
|
42
|
+
DATA_FIELD_NUMBER: _builtins.int
|
|
43
|
+
data: _builtins.bytes
|
|
44
44
|
"""The serialized Apache Arrow buffer (IPC stream or file format bytes)"""
|
|
45
45
|
def __init__(
|
|
46
46
|
self,
|
|
47
47
|
*,
|
|
48
|
-
data:
|
|
48
|
+
data: _builtins.bytes = ...,
|
|
49
49
|
) -> None: ...
|
|
50
|
-
_ClearFieldArgType:
|
|
50
|
+
_ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data"] # noqa: Y015
|
|
51
51
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
52
52
|
|
|
53
|
-
Global___ArrowData:
|
|
53
|
+
Global___ArrowData: _TypeAlias = ArrowData # noqa: Y015
|
|
@@ -17,49 +17,49 @@ See the License for the specific language governing permissions and
|
|
|
17
17
|
limitations under the License.
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
import
|
|
23
|
-
import
|
|
20
|
+
from google.protobuf import descriptor as _descriptor
|
|
21
|
+
from google.protobuf import message as _message
|
|
22
|
+
from streamlit.proto import Arrow_pb2 as _Arrow_pb2
|
|
23
|
+
import builtins as _builtins
|
|
24
24
|
import sys
|
|
25
|
-
import typing
|
|
25
|
+
import typing as _typing
|
|
26
26
|
|
|
27
27
|
if sys.version_info >= (3, 10):
|
|
28
|
-
|
|
28
|
+
from typing import TypeAlias as _TypeAlias
|
|
29
29
|
else:
|
|
30
|
-
import
|
|
30
|
+
from typing_extensions import TypeAlias as _TypeAlias
|
|
31
31
|
|
|
32
|
-
DESCRIPTOR:
|
|
32
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
33
33
|
|
|
34
|
-
@
|
|
35
|
-
class ArrowNamedDataSet(
|
|
34
|
+
@_typing.final
|
|
35
|
+
class ArrowNamedDataSet(_message.Message):
|
|
36
36
|
"""A dataset that can be referenced by name."""
|
|
37
37
|
|
|
38
|
-
DESCRIPTOR:
|
|
38
|
+
DESCRIPTOR: _descriptor.Descriptor
|
|
39
39
|
|
|
40
|
-
NAME_FIELD_NUMBER:
|
|
41
|
-
HAS_NAME_FIELD_NUMBER:
|
|
42
|
-
DATA_FIELD_NUMBER:
|
|
43
|
-
name:
|
|
40
|
+
NAME_FIELD_NUMBER: _builtins.int
|
|
41
|
+
HAS_NAME_FIELD_NUMBER: _builtins.int
|
|
42
|
+
DATA_FIELD_NUMBER: _builtins.int
|
|
43
|
+
name: _builtins.str
|
|
44
44
|
"""The dataset name."""
|
|
45
|
-
has_name:
|
|
45
|
+
has_name: _builtins.bool
|
|
46
46
|
"""True if the name field (above) was manually set. This is used to get
|
|
47
47
|
around proto3 not having a way to check whether something was set.
|
|
48
48
|
"""
|
|
49
|
-
@property
|
|
50
|
-
def data(self) ->
|
|
49
|
+
@_builtins.property
|
|
50
|
+
def data(self) -> _Arrow_pb2.Arrow:
|
|
51
51
|
"""The data itself."""
|
|
52
52
|
|
|
53
53
|
def __init__(
|
|
54
54
|
self,
|
|
55
55
|
*,
|
|
56
|
-
name:
|
|
57
|
-
has_name:
|
|
58
|
-
data:
|
|
56
|
+
name: _builtins.str = ...,
|
|
57
|
+
has_name: _builtins.bool = ...,
|
|
58
|
+
data: _Arrow_pb2.Arrow | None = ...,
|
|
59
59
|
) -> None: ...
|
|
60
|
-
_HasFieldArgType:
|
|
61
|
-
def HasField(self, field_name: _HasFieldArgType) ->
|
|
62
|
-
_ClearFieldArgType:
|
|
60
|
+
_HasFieldArgType: _TypeAlias = _typing.Literal["data", b"data"] # noqa: Y015
|
|
61
|
+
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
62
|
+
_ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "has_name", b"has_name", "name", b"name"] # noqa: Y015
|
|
63
63
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
64
64
|
|
|
65
|
-
Global___ArrowNamedDataSet:
|
|
65
|
+
Global___ArrowNamedDataSet: _TypeAlias = ArrowNamedDataSet # noqa: Y015
|