streamlit-nightly 1.44.2.dev20250428__py3-none-any.whl → 1.45.1.dev20250430__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/cli_util.py +1 -1
- streamlit/commands/experimental_query_params.py +1 -1
- streamlit/commands/page_config.py +1 -1
- streamlit/config.py +5 -5
- streamlit/elements/arrow.py +5 -5
- streamlit/elements/deck_gl_json_chart.py +3 -3
- streamlit/elements/dialog_decorator.py +0 -1
- streamlit/elements/doc_string.py +24 -3
- streamlit/elements/image.py +8 -9
- streamlit/elements/json.py +13 -0
- streamlit/elements/lib/image_utils.py +20 -21
- streamlit/elements/map.py +1 -1
- streamlit/elements/metric.py +1 -1
- streamlit/elements/plotly_chart.py +4 -4
- streamlit/elements/progress.py +25 -1
- streamlit/elements/vega_charts.py +1 -1
- streamlit/elements/widgets/audio_input.py +21 -0
- streamlit/elements/widgets/button.py +6 -5
- streamlit/elements/widgets/file_uploader.py +5 -4
- streamlit/elements/widgets/number_input.py +9 -10
- streamlit/elements/widgets/slider.py +1 -1
- streamlit/error_util.py +1 -1
- streamlit/logger.py +5 -5
- streamlit/navigation/page.py +1 -1
- streamlit/proto/AudioInput_pb2.py +4 -3
- streamlit/proto/AudioInput_pb2.pyi +7 -2
- streamlit/proto/DocString_pb2.py +6 -5
- streamlit/proto/DocString_pb2.pyi +9 -1
- streamlit/proto/Json_pb2.py +4 -3
- streamlit/proto/Json_pb2.pyi +9 -2
- streamlit/proto/Progress_pb2.py +4 -3
- streamlit/proto/Progress_pb2.pyi +7 -1
- streamlit/runtime/app_session.py +9 -9
- streamlit/runtime/caching/cache_data_api.py +1 -1
- streamlit/runtime/caching/cache_utils.py +3 -2
- streamlit/runtime/caching/hashing.py +3 -4
- streamlit/runtime/caching/storage/local_disk_cache_storage.py +2 -2
- streamlit/runtime/connection_factory.py +8 -8
- streamlit/runtime/context.py +1 -1
- streamlit/runtime/credentials.py +1 -0
- streamlit/runtime/forward_msg_queue.py +2 -2
- streamlit/runtime/metrics_util.py +2 -2
- streamlit/runtime/runtime_util.py +1 -1
- streamlit/runtime/scriptrunner/script_runner.py +4 -4
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{ErrorOutline.esm.BXGjCB7E.js → ErrorOutline.esm.JdVs1Qkg.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.sOCqSnDy.js → FileDownload.esm.BlQJ4vNG.js} +1 -1
- streamlit/static/static/js/{FileHelper.DuN7B5ko.js → FileHelper.V4GYCyDu.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.mBqxy6fp.js → FormClearHelper.CyxVAl63.js} +1 -1
- streamlit/static/static/js/{Hooks.B8RCaOU-.js → Hooks.CwzpXjfg.js} +1 -1
- streamlit/static/static/js/{InputInstructions.CgQJAdmY.js → InputInstructions.DLh-ti71.js} +1 -1
- streamlit/static/static/js/{ProgressBar.o46iipVl.js → ProgressBar.C7bBETsY.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.CZifGklq.js → RenderInPortalIfExists.BMvxq2hn.js} +1 -1
- streamlit/static/static/js/{Toolbar.CKRoYZWM.js → Toolbar.CotfqUm6.js} +1 -1
- streamlit/static/static/js/{base-input.Me5gYF5B.js → base-input.BxaSmpU7.js} +1 -1
- streamlit/static/static/js/{checkbox.CWWogItI.js → checkbox.CrglCerk.js} +1 -1
- streamlit/static/static/js/{createSuper.Bsmy7vnu.js → createSuper.Bs0C396a.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.CgAv1I8N.js → data-grid-overlay-editor.D0k84F-1.js} +1 -1
- streamlit/static/static/js/{downloader.BbuyvUmM.js → downloader.BpZrmdUi.js} +1 -1
- streamlit/static/static/js/{es6.cFKClVYr.js → es6.DD8ccAPk.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.D00awOKx.js → iframeResizer.contentWindow.7G5YE4ki.js} +1 -1
- streamlit/static/static/js/{index.CZT8t1KG.js → index.5p5xlu27.js} +1 -1
- streamlit/static/static/js/{index.DUVjoXrp.js → index.65FBensJ.js} +1 -1
- streamlit/static/static/js/{index.B0eFd777.js → index.80LGX7Ne.js} +1 -1
- streamlit/static/static/js/{index.ew1fqjzv.js → index.9sjzZWLH.js} +1 -1
- streamlit/static/static/js/{index.VrX7AJMW.js → index.B2lDS5vI.js} +1 -1
- streamlit/static/static/js/{index.zbOUPreQ.js → index.B3VXbj_b.js} +1 -1
- streamlit/static/static/js/{index.GIpP3S4h.js → index.BDLXYKTS.js} +1 -1
- streamlit/static/static/js/{index.Db4G4s87.js → index.BF0CTyRa.js} +1 -1
- streamlit/static/static/js/{index.djYQBt-8.js → index.BI5f0VII.js} +1 -1
- streamlit/static/static/js/{index.Dn4hsDID.js → index.BNhdn2vD.js} +1 -1
- streamlit/static/static/js/{index.Bo5OoJ1E.js → index.BNm3tuep.js} +1 -1
- streamlit/static/static/js/{index.DkQYsEGq.js → index.BQqNcnRp.js} +63 -63
- streamlit/static/static/js/{index.CC6pozcl.js → index.BjKCKyJI.js} +1 -1
- streamlit/static/static/js/{index.C8S8FJep.js → index.C2kSDT38.js} +1 -1
- streamlit/static/static/js/{index.D67skAdZ.js → index.CMjYL7Ho.js} +1 -1
- streamlit/static/static/js/{index.B5KSWyCG.js → index.COBwb1mq.js} +1 -1
- streamlit/static/static/js/{index.Cg3APxPS.js → index.COpV4IZK.js} +1 -1
- streamlit/static/static/js/{index.DZSznc3f.js → index.Cgzj9ewR.js} +1 -1
- streamlit/static/static/js/{index.bliAXvPp.js → index.CkutRj8u.js} +1 -1
- streamlit/static/static/js/{index.v9S4U7E0.js → index.Co5UsG7W.js} +1 -1
- streamlit/static/static/js/{index.BY-1pChC.js → index.CveEeb4Q.js} +1 -1
- streamlit/static/static/js/{index.ZMXLPc9m.js → index.Czzj5-re.js} +1 -1
- streamlit/static/static/js/{index.CEFfPwWA.js → index.D1wWsFMc.js} +1 -1
- streamlit/static/static/js/{index.DnnK1XX4.js → index.D5GLQoRz.js} +1 -1
- streamlit/static/static/js/{index.B_FepcMP.js → index.DICnhvRg.js} +1 -1
- streamlit/static/static/js/{index.BfEtVe_N.js → index.DK_eUkea.js} +1 -1
- streamlit/static/static/js/{index.BtCmnwwO.js → index.DM4oCpFy.js} +1 -1
- streamlit/static/static/js/{index.B6NqnBxa.js → index.DO535td0.js} +1 -1
- streamlit/static/static/js/{index.By8gv4Ay.js → index.DUF1Zxw6.js} +1 -1
- streamlit/static/static/js/{index.CtsvxUli.js → index.DW80zFo4.js} +1 -1
- streamlit/static/static/js/{index.Zbagu1xh.js → index.DX2vW3qb.js} +1 -1
- streamlit/static/static/js/{index.BMizE8Sq.js → index.DfgXsqtW.js} +1 -1
- streamlit/static/static/js/{index.BKz9YyeL.js → index.Dq6k7Ztd.js} +1 -1
- streamlit/static/static/js/{index.BtTvTjVr.js → index.Dz4o-tqP.js} +5 -5
- streamlit/static/static/js/{index.CSZNuohX.js → index.Olz7Xaf0.js} +1 -1
- streamlit/static/static/js/{index.HOc29Qsj.js → index.SARy_Med.js} +1 -1
- streamlit/static/static/js/{index.eVt4urZS.js → index.rHb0nIsm.js} +1 -1
- streamlit/static/static/js/{input.E-TEQSd2.js → input.ChMez782.js} +1 -1
- streamlit/static/static/js/{memory.C47SiSLX.js → memory.DEIZt-uk.js} +1 -1
- streamlit/static/static/js/{mergeWith.CuOPq9Xx.js → mergeWith.DV3wfmZj.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.oJywx_AR.js → number-overlay-editor.CVWV51LZ.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.DezSYWQP.js → possibleConstructorReturn.D8SHK4fu.js} +1 -1
- streamlit/static/static/js/{sandbox.CpLGEYsx.js → sandbox.2Y0eB1Fb.js} +1 -1
- streamlit/static/static/js/{textarea.CF2OGnSF.js → textarea.CfOMMQUp.js} +1 -1
- streamlit/static/static/js/{timepicker.CckJhoGD.js → timepicker.BCEVqM6L.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.DrtLgJ_5.js → toConsumableArray.CgIgbjyR.js} +1 -1
- streamlit/static/static/js/{uniqueId.kgGoKER7.js → uniqueId.CasOW7eQ.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.CHBqT0_O.js → useBasicWidgetState.DM0uW3hG.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.A8V2n4e2.js → useOnInputChange.C9p9DssL.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.Bh5OZGIu.js → withFullScreenWrapper.Du9h1SFo.js} +1 -1
- streamlit/testing/v1/app_test.py +2 -2
- streamlit/testing/v1/element_tree.py +7 -7
- streamlit/user_info.py +3 -3
- streamlit/web/cli.py +4 -4
- streamlit/web/server/server_util.py +1 -1
- {streamlit_nightly-1.44.2.dev20250428.dist-info → streamlit_nightly-1.45.1.dev20250430.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.44.2.dev20250428.dist-info → streamlit_nightly-1.45.1.dev20250430.dist-info}/RECORD +122 -122
- {streamlit_nightly-1.44.2.dev20250428.dist-info → streamlit_nightly-1.45.1.dev20250430.dist-info}/WHEEL +1 -1
- {streamlit_nightly-1.44.2.dev20250428.data → streamlit_nightly-1.45.1.dev20250430.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.44.2.dev20250428.dist-info → streamlit_nightly-1.45.1.dev20250430.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.44.2.dev20250428.dist-info → streamlit_nightly-1.45.1.dev20250430.dist-info}/top_level.txt +0 -0
streamlit/logger.py
CHANGED
@@ -35,15 +35,15 @@ def set_log_level(level: str | int) -> None:
|
|
35
35
|
|
36
36
|
if isinstance(level, str):
|
37
37
|
level = level.upper()
|
38
|
-
if level
|
38
|
+
if level in {"CRITICAL", logging.CRITICAL}:
|
39
39
|
log_level = logging.CRITICAL
|
40
|
-
elif level
|
40
|
+
elif level in {"ERROR", logging.ERROR}:
|
41
41
|
log_level = logging.ERROR
|
42
|
-
elif level
|
42
|
+
elif level in {"WARNING", logging.WARNING}:
|
43
43
|
log_level = logging.WARNING
|
44
|
-
elif level
|
44
|
+
elif level in {"INFO", logging.INFO}:
|
45
45
|
log_level = logging.INFO
|
46
|
-
elif level
|
46
|
+
elif level in {"DEBUG", logging.DEBUG}:
|
47
47
|
log_level = logging.DEBUG
|
48
48
|
else:
|
49
49
|
msg = 'undefined log level "%s"' % level
|
streamlit/navigation/page.py
CHANGED
@@ -294,7 +294,7 @@ class StreamlitPage:
|
|
294
294
|
module = types.ModuleType("__main__")
|
295
295
|
# We want __file__ to be the string path to the script
|
296
296
|
module.__dict__["__file__"] = str(self._page)
|
297
|
-
exec(code, module.__dict__)
|
297
|
+
exec(code, module.__dict__) # noqa: S102
|
298
298
|
|
299
299
|
@property
|
300
300
|
def _script_hash(self) -> str:
|
@@ -13,9 +13,10 @@ _sym_db = _symbol_database.Default()
|
|
13
13
|
|
14
14
|
|
15
15
|
from streamlit.proto import LabelVisibilityMessage_pb2 as streamlit_dot_proto_dot_LabelVisibilityMessage__pb2
|
16
|
+
from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
|
16
17
|
|
17
18
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/AudioInput.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\"\
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/AudioInput.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\x1a!streamlit/proto/WidthConfig.proto\"\xb9\x01\n\nAudioInput\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12\x0c\n\x04help\x18\x03 \x01(\t\x12\x0f\n\x07\x66orm_id\x18\x04 \x01(\t\x12\x10\n\x08\x64isabled\x18\x05 \x01(\x08\x12\x31\n\x10label_visibility\x18\x06 \x01(\x0b\x32\x17.LabelVisibilityMessage\x12,\n\x0cwidth_config\x18\x07 \x01(\x0b\x32\x16.streamlit.WidthConfigB/\n\x1c\x63om.snowflake.apps.streamlitB\x0f\x41udioInputProtob\x06proto3')
|
19
20
|
|
20
21
|
_globals = globals()
|
21
22
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -23,6 +24,6 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.AudioInput_
|
|
23
24
|
if not _descriptor._USE_C_DESCRIPTORS:
|
24
25
|
_globals['DESCRIPTOR']._loaded_options = None
|
25
26
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\017AudioInputProto'
|
26
|
-
_globals['_AUDIOINPUT']._serialized_start=
|
27
|
-
_globals['_AUDIOINPUT']._serialized_end=
|
27
|
+
_globals['_AUDIOINPUT']._serialized_start=118
|
28
|
+
_globals['_AUDIOINPUT']._serialized_end=303
|
28
29
|
# @@protoc_insertion_point(module_scope)
|
@@ -21,6 +21,7 @@ import builtins
|
|
21
21
|
import google.protobuf.descriptor
|
22
22
|
import google.protobuf.message
|
23
23
|
import streamlit.proto.LabelVisibilityMessage_pb2
|
24
|
+
import streamlit.proto.WidthConfig_pb2
|
24
25
|
import typing
|
25
26
|
|
26
27
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
@@ -35,6 +36,7 @@ class AudioInput(google.protobuf.message.Message):
|
|
35
36
|
FORM_ID_FIELD_NUMBER: builtins.int
|
36
37
|
DISABLED_FIELD_NUMBER: builtins.int
|
37
38
|
LABEL_VISIBILITY_FIELD_NUMBER: builtins.int
|
39
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
38
40
|
id: builtins.str
|
39
41
|
label: builtins.str
|
40
42
|
help: builtins.str
|
@@ -42,6 +44,8 @@ class AudioInput(google.protobuf.message.Message):
|
|
42
44
|
disabled: builtins.bool
|
43
45
|
@property
|
44
46
|
def label_visibility(self) -> streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage: ...
|
47
|
+
@property
|
48
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig: ...
|
45
49
|
def __init__(
|
46
50
|
self,
|
47
51
|
*,
|
@@ -51,8 +55,9 @@ class AudioInput(google.protobuf.message.Message):
|
|
51
55
|
form_id: builtins.str = ...,
|
52
56
|
disabled: builtins.bool = ...,
|
53
57
|
label_visibility: streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage | None = ...,
|
58
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
54
59
|
) -> None: ...
|
55
|
-
def HasField(self, field_name: typing.Literal["label_visibility", b"label_visibility"]) -> builtins.bool: ...
|
56
|
-
def ClearField(self, field_name: typing.Literal["disabled", b"disabled", "form_id", b"form_id", "help", b"help", "id", b"id", "label", b"label", "label_visibility", b"label_visibility"]) -> None: ...
|
60
|
+
def HasField(self, field_name: typing.Literal["label_visibility", b"label_visibility", "width_config", b"width_config"]) -> builtins.bool: ...
|
61
|
+
def ClearField(self, field_name: typing.Literal["disabled", b"disabled", "form_id", b"form_id", "help", b"help", "id", b"id", "label", b"label", "label_visibility", b"label_visibility", "width_config", b"width_config"]) -> None: ...
|
57
62
|
|
58
63
|
global___AudioInput = AudioInput
|
streamlit/proto/DocString_pb2.py
CHANGED
@@ -12,9 +12,10 @@ from google.protobuf.internal import builder as _builder
|
|
12
12
|
_sym_db = _symbol_database.Default()
|
13
13
|
|
14
14
|
|
15
|
+
from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
|
15
16
|
|
16
17
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fstreamlit/proto/DocString.proto\"
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fstreamlit/proto/DocString.proto\x1a!streamlit/proto/WidthConfig.proto\"\xa4\x01\n\tDocString\x12\x12\n\ndoc_string\x18\x03 \x01(\t\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\r\n\x05value\x18\x07 \x01(\t\x12\x18\n\x07members\x18\x08 \x03(\x0b\x32\x07.Member\x12,\n\x0cwidth_config\x18\t \x01(\x0b\x32\x16.streamlit.WidthConfigJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06\"W\n\x06Member\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0f\n\x05value\x18\x03 \x01(\tH\x00\x12\x14\n\ndoc_string\x18\x04 \x01(\tH\x00\x42\n\n\x08\x63ontentsB.\n\x1c\x63om.snowflake.apps.streamlitB\x0e\x44ocStringProtob\x06proto3')
|
18
19
|
|
19
20
|
_globals = globals()
|
20
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -22,8 +23,8 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.DocString_p
|
|
22
23
|
if not _descriptor._USE_C_DESCRIPTORS:
|
23
24
|
_globals['DESCRIPTOR']._loaded_options = None
|
24
25
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\016DocStringProto'
|
25
|
-
_globals['_DOCSTRING']._serialized_start=
|
26
|
-
_globals['_DOCSTRING']._serialized_end=
|
27
|
-
_globals['_MEMBER']._serialized_start=
|
28
|
-
_globals['_MEMBER']._serialized_end=
|
26
|
+
_globals['_DOCSTRING']._serialized_start=71
|
27
|
+
_globals['_DOCSTRING']._serialized_end=235
|
28
|
+
_globals['_MEMBER']._serialized_start=237
|
29
|
+
_globals['_MEMBER']._serialized_end=324
|
29
30
|
# @@protoc_insertion_point(module_scope)
|
@@ -22,6 +22,7 @@ import collections.abc
|
|
22
22
|
import google.protobuf.descriptor
|
23
23
|
import google.protobuf.internal.containers
|
24
24
|
import google.protobuf.message
|
25
|
+
import streamlit.proto.WidthConfig_pb2
|
25
26
|
import typing
|
26
27
|
|
27
28
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
@@ -37,6 +38,7 @@ class DocString(google.protobuf.message.Message):
|
|
37
38
|
NAME_FIELD_NUMBER: builtins.int
|
38
39
|
VALUE_FIELD_NUMBER: builtins.int
|
39
40
|
MEMBERS_FIELD_NUMBER: builtins.int
|
41
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
40
42
|
doc_string: builtins.str
|
41
43
|
"""The doc string."""
|
42
44
|
type: builtins.str
|
@@ -49,6 +51,10 @@ class DocString(google.protobuf.message.Message):
|
|
49
51
|
def members(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Member]:
|
50
52
|
"""List of this object's methods and member variables."""
|
51
53
|
|
54
|
+
@property
|
55
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig:
|
56
|
+
"""Indicates the width setting: "stetch" or a pixel value."""
|
57
|
+
|
52
58
|
def __init__(
|
53
59
|
self,
|
54
60
|
*,
|
@@ -57,8 +63,10 @@ class DocString(google.protobuf.message.Message):
|
|
57
63
|
name: builtins.str = ...,
|
58
64
|
value: builtins.str = ...,
|
59
65
|
members: collections.abc.Iterable[global___Member] | None = ...,
|
66
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
60
67
|
) -> None: ...
|
61
|
-
def
|
68
|
+
def HasField(self, field_name: typing.Literal["width_config", b"width_config"]) -> builtins.bool: ...
|
69
|
+
def ClearField(self, field_name: typing.Literal["doc_string", b"doc_string", "members", b"members", "name", b"name", "type", b"type", "value", b"value", "width_config", b"width_config"]) -> None: ...
|
62
70
|
|
63
71
|
global___DocString = DocString
|
64
72
|
|
streamlit/proto/Json_pb2.py
CHANGED
@@ -12,9 +12,10 @@ from google.protobuf.internal import builder as _builder
|
|
12
12
|
_sym_db = _symbol_database.Default()
|
13
13
|
|
14
14
|
|
15
|
+
from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
|
15
16
|
|
16
17
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1astreamlit/proto/Json.proto\"
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1astreamlit/proto/Json.proto\x1a!streamlit/proto/WidthConfig.proto\"\x88\x01\n\x04Json\x12\x0c\n\x04\x62ody\x18\x01 \x01(\t\x12\x10\n\x08\x65xpanded\x18\x02 \x01(\x08\x12\x1d\n\x10max_expand_depth\x18\x03 \x01(\x05H\x00\x88\x01\x01\x12,\n\x0cwidth_config\x18\x04 \x01(\x0b\x32\x16.streamlit.WidthConfigB\x13\n\x11_max_expand_depthB)\n\x1c\x63om.snowflake.apps.streamlitB\tJsonProtob\x06proto3')
|
18
19
|
|
19
20
|
_globals = globals()
|
20
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -22,6 +23,6 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.Json_pb2',
|
|
22
23
|
if not _descriptor._USE_C_DESCRIPTORS:
|
23
24
|
_globals['DESCRIPTOR']._loaded_options = None
|
24
25
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\tJsonProto'
|
25
|
-
_globals['_JSON']._serialized_start=
|
26
|
-
_globals['_JSON']._serialized_end=
|
26
|
+
_globals['_JSON']._serialized_start=66
|
27
|
+
_globals['_JSON']._serialized_end=202
|
27
28
|
# @@protoc_insertion_point(module_scope)
|
streamlit/proto/Json_pb2.pyi
CHANGED
@@ -20,6 +20,7 @@ limitations under the License.
|
|
20
20
|
import builtins
|
21
21
|
import google.protobuf.descriptor
|
22
22
|
import google.protobuf.message
|
23
|
+
import streamlit.proto.WidthConfig_pb2
|
23
24
|
import typing
|
24
25
|
|
25
26
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
@@ -31,6 +32,7 @@ class Json(google.protobuf.message.Message):
|
|
31
32
|
BODY_FIELD_NUMBER: builtins.int
|
32
33
|
EXPANDED_FIELD_NUMBER: builtins.int
|
33
34
|
MAX_EXPAND_DEPTH_FIELD_NUMBER: builtins.int
|
35
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
34
36
|
body: builtins.str
|
35
37
|
"""Content to display."""
|
36
38
|
expanded: builtins.bool
|
@@ -39,15 +41,20 @@ class Json(google.protobuf.message.Message):
|
|
39
41
|
"""
|
40
42
|
max_expand_depth: builtins.int
|
41
43
|
"""The maximum depth to expand the JSON object."""
|
44
|
+
@property
|
45
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig:
|
46
|
+
"""Width configuration"""
|
47
|
+
|
42
48
|
def __init__(
|
43
49
|
self,
|
44
50
|
*,
|
45
51
|
body: builtins.str = ...,
|
46
52
|
expanded: builtins.bool = ...,
|
47
53
|
max_expand_depth: builtins.int | None = ...,
|
54
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
48
55
|
) -> None: ...
|
49
|
-
def HasField(self, field_name: typing.Literal["_max_expand_depth", b"_max_expand_depth", "max_expand_depth", b"max_expand_depth"]) -> builtins.bool: ...
|
50
|
-
def ClearField(self, field_name: typing.Literal["_max_expand_depth", b"_max_expand_depth", "body", b"body", "expanded", b"expanded", "max_expand_depth", b"max_expand_depth"]) -> None: ...
|
56
|
+
def HasField(self, field_name: typing.Literal["_max_expand_depth", b"_max_expand_depth", "max_expand_depth", b"max_expand_depth", "width_config", b"width_config"]) -> builtins.bool: ...
|
57
|
+
def ClearField(self, field_name: typing.Literal["_max_expand_depth", b"_max_expand_depth", "body", b"body", "expanded", b"expanded", "max_expand_depth", b"max_expand_depth", "width_config", b"width_config"]) -> None: ...
|
51
58
|
def WhichOneof(self, oneof_group: typing.Literal["_max_expand_depth", b"_max_expand_depth"]) -> typing.Literal["max_expand_depth"] | None: ...
|
52
59
|
|
53
60
|
global___Json = Json
|
streamlit/proto/Progress_pb2.py
CHANGED
@@ -12,9 +12,10 @@ from google.protobuf.internal import builder as _builder
|
|
12
12
|
_sym_db = _symbol_database.Default()
|
13
13
|
|
14
14
|
|
15
|
+
from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
|
15
16
|
|
16
17
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1estreamlit/proto/Progress.proto\"\
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1estreamlit/proto/Progress.proto\x1a!streamlit/proto/WidthConfig.proto\"U\n\x08Progress\x12\r\n\x05value\x18\x01 \x01(\r\x12\x0c\n\x04text\x18\x02 \x01(\t\x12,\n\x0cwidth_config\x18\x03 \x01(\x0b\x32\x16.streamlit.WidthConfigB-\n\x1c\x63om.snowflake.apps.streamlitB\rProgressProtob\x06proto3')
|
18
19
|
|
19
20
|
_globals = globals()
|
20
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -22,6 +23,6 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.Progress_pb
|
|
22
23
|
if not _descriptor._USE_C_DESCRIPTORS:
|
23
24
|
_globals['DESCRIPTOR']._loaded_options = None
|
24
25
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\rProgressProto'
|
25
|
-
_globals['_PROGRESS']._serialized_start=
|
26
|
-
_globals['_PROGRESS']._serialized_end=
|
26
|
+
_globals['_PROGRESS']._serialized_start=69
|
27
|
+
_globals['_PROGRESS']._serialized_end=154
|
27
28
|
# @@protoc_insertion_point(module_scope)
|
streamlit/proto/Progress_pb2.pyi
CHANGED
@@ -20,6 +20,7 @@ limitations under the License.
|
|
20
20
|
import builtins
|
21
21
|
import google.protobuf.descriptor
|
22
22
|
import google.protobuf.message
|
23
|
+
import streamlit.proto.WidthConfig_pb2
|
23
24
|
import typing
|
24
25
|
|
25
26
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
@@ -30,14 +31,19 @@ class Progress(google.protobuf.message.Message):
|
|
30
31
|
|
31
32
|
VALUE_FIELD_NUMBER: builtins.int
|
32
33
|
TEXT_FIELD_NUMBER: builtins.int
|
34
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
33
35
|
value: builtins.int
|
34
36
|
text: builtins.str
|
37
|
+
@property
|
38
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig: ...
|
35
39
|
def __init__(
|
36
40
|
self,
|
37
41
|
*,
|
38
42
|
value: builtins.int = ...,
|
39
43
|
text: builtins.str = ...,
|
44
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
40
45
|
) -> None: ...
|
41
|
-
def
|
46
|
+
def HasField(self, field_name: typing.Literal["width_config", b"width_config"]) -> builtins.bool: ...
|
47
|
+
def ClearField(self, field_name: typing.Literal["text", b"text", "value", b"value", "width_config", b"width_config"]) -> None: ...
|
42
48
|
|
43
49
|
global___Progress = Progress
|
streamlit/runtime/app_session.py
CHANGED
@@ -615,11 +615,11 @@ class AppSession:
|
|
615
615
|
|
616
616
|
self._enqueue_forward_msg(msg)
|
617
617
|
|
618
|
-
elif
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
618
|
+
elif event in {
|
619
|
+
ScriptRunnerEvent.SCRIPT_STOPPED_WITH_SUCCESS,
|
620
|
+
ScriptRunnerEvent.SCRIPT_STOPPED_WITH_COMPILE_ERROR,
|
621
|
+
ScriptRunnerEvent.FRAGMENT_STOPPED_WITH_SUCCESS,
|
622
|
+
}:
|
623
623
|
if self._state != AppSessionState.SHUTDOWN_REQUESTED:
|
624
624
|
self._state = AppSessionState.APP_NOT_RUNNING
|
625
625
|
|
@@ -633,10 +633,10 @@ class AppSession:
|
|
633
633
|
self._enqueue_forward_msg(self._create_script_finished_message(status))
|
634
634
|
self._debug_last_backmsg_id = None
|
635
635
|
|
636
|
-
if
|
637
|
-
|
638
|
-
|
639
|
-
|
636
|
+
if event in {
|
637
|
+
ScriptRunnerEvent.SCRIPT_STOPPED_WITH_SUCCESS,
|
638
|
+
ScriptRunnerEvent.FRAGMENT_STOPPED_WITH_SUCCESS,
|
639
|
+
}:
|
640
640
|
# The script completed successfully: update our
|
641
641
|
# LocalSourcesWatcher to account for any source code changes
|
642
642
|
# that change which modules should be watched.
|
@@ -634,7 +634,7 @@ class DataCache(Cache):
|
|
634
634
|
raise CacheError(str(e)) from e
|
635
635
|
|
636
636
|
try:
|
637
|
-
entry = pickle.loads(pickled_entry)
|
637
|
+
entry = pickle.loads(pickled_entry) # noqa: S301
|
638
638
|
if not isinstance(entry, CachedResult):
|
639
639
|
# Loaded an old cache file format, remove it and let the caller
|
640
640
|
# rerun the function.
|
@@ -473,8 +473,9 @@ def _make_function_key(cache_type: CacheType, func: FunctionType) -> str:
|
|
473
473
|
|
474
474
|
# Include the function's __module__ and __qualname__ strings in the hash.
|
475
475
|
# This means that two identical functions in different modules
|
476
|
-
# will not share a hash
|
477
|
-
# functions in the same module
|
476
|
+
# will not share a hash.
|
477
|
+
# It also means that two identical *nested* functions in the same module
|
478
|
+
# *will* share a hash (see https://github.com/streamlit/streamlit/issues/11157).
|
478
479
|
update_hash(
|
479
480
|
(func.__module__, func.__qualname__),
|
480
481
|
hasher=func_hasher,
|
@@ -117,11 +117,10 @@ If you think this is actually a Streamlit bug, please
|
|
117
117
|
|
118
118
|
if hash_source is None:
|
119
119
|
object_desc = "something"
|
120
|
+
elif hasattr(hash_source, "__name__"):
|
121
|
+
object_desc = f"`{hash_source.__name__}()`"
|
120
122
|
else:
|
121
|
-
|
122
|
-
object_desc = f"`{hash_source.__name__}()`"
|
123
|
-
else:
|
124
|
-
object_desc = "a function"
|
123
|
+
object_desc = "a function"
|
125
124
|
|
126
125
|
decorator_name = ""
|
127
126
|
if self.cache_type is CacheType.RESOURCE:
|
@@ -143,8 +143,8 @@ class LocalDiskCacheStorage(CacheStorage):
|
|
143
143
|
if self.persist == "disk":
|
144
144
|
path = self._get_cache_file_path(key)
|
145
145
|
try:
|
146
|
-
with streamlit_read(path, binary=True) as
|
147
|
-
value =
|
146
|
+
with streamlit_read(path, binary=True) as file:
|
147
|
+
value = file.read()
|
148
148
|
_LOGGER.debug("Disk cache HIT: %s", key)
|
149
149
|
return bytes(value)
|
150
150
|
except FileNotFoundError:
|
@@ -374,11 +374,16 @@ def connection_factory(
|
|
374
374
|
envvar_name = name[len(USE_ENV_PREFIX) :]
|
375
375
|
name = os.environ[envvar_name]
|
376
376
|
|
377
|
-
|
377
|
+
# type is a nice kwarg name for the st.connection user but is annoying to work with
|
378
|
+
# since it conflicts with the builtin function name and thus gets syntax
|
379
|
+
# highlighted.
|
380
|
+
connection_class = type
|
381
|
+
|
382
|
+
if connection_class is None:
|
378
383
|
if name in FIRST_PARTY_CONNECTIONS:
|
379
384
|
# We allow users to simply write `st.connection("sql")` instead of
|
380
385
|
# `st.connection("sql", type="sql")`.
|
381
|
-
|
386
|
+
connection_class = _get_first_party_connection(name)
|
382
387
|
else:
|
383
388
|
# The user didn't specify a type, so we try to pull it out from their
|
384
389
|
# secrets.toml file. NOTE: we're okay with any of the dict lookups below
|
@@ -386,12 +391,7 @@ def connection_factory(
|
|
386
391
|
# it must be the case that it's defined in secrets.toml and should raise an
|
387
392
|
# Exception otherwise.
|
388
393
|
secrets_singleton.load_if_toml_exists()
|
389
|
-
|
390
|
-
|
391
|
-
# type is a nice kwarg name for the st.connection user but is annoying to work with
|
392
|
-
# since it conflicts with the builtin function name and thus gets syntax
|
393
|
-
# highlighted.
|
394
|
-
connection_class = type
|
394
|
+
connection_class = secrets_singleton["connections"][name]["type"]
|
395
395
|
|
396
396
|
if isinstance(connection_class, str):
|
397
397
|
# We assume that a connection_class specified via string is either the fully
|
streamlit/runtime/context.py
CHANGED
@@ -367,7 +367,7 @@ class ContextProxy:
|
|
367
367
|
session_client_request = _get_request()
|
368
368
|
if session_client_request is not None:
|
369
369
|
remote_ip = session_client_request.remote_ip
|
370
|
-
if remote_ip
|
370
|
+
if remote_ip in {"::1", "127.0.0.1"}:
|
371
371
|
return None
|
372
372
|
return remote_ip
|
373
373
|
return None
|
streamlit/runtime/credentials.py
CHANGED
@@ -184,7 +184,7 @@ def _is_composable_message(msg: ForwardMsg) -> bool:
|
|
184
184
|
# operation can raise errors, and we don't have a good way of handling
|
185
185
|
# those errors in the message queue.
|
186
186
|
delta_type = msg.delta.WhichOneof("type")
|
187
|
-
return delta_type
|
187
|
+
return delta_type not in {"add_rows", "arrow_add_rows"}
|
188
188
|
|
189
189
|
|
190
190
|
def _maybe_compose_delta_msgs(
|
@@ -222,7 +222,7 @@ def _maybe_compose_delta_msgs(
|
|
222
222
|
return new_msg
|
223
223
|
|
224
224
|
new_delta_type = new_msg.delta.WhichOneof("type")
|
225
|
-
if new_delta_type
|
225
|
+
if new_delta_type in {"new_element", "add_block"}:
|
226
226
|
return new_msg
|
227
227
|
|
228
228
|
return None
|
@@ -201,8 +201,8 @@ def _get_machine_id_v4() -> str:
|
|
201
201
|
stable_id = None
|
202
202
|
|
203
203
|
if os.path.exists(filepath):
|
204
|
-
with file_util.streamlit_read(filepath) as
|
205
|
-
stable_id =
|
204
|
+
with file_util.streamlit_read(filepath) as file:
|
205
|
+
stable_id = file.read()
|
206
206
|
|
207
207
|
if not stable_id:
|
208
208
|
stable_id = str(uuid.uuid4())
|
@@ -74,7 +74,7 @@ def serialize_forward_msg(msg: ForwardMsg) -> bytes:
|
|
74
74
|
if len(msg_str) > get_max_message_size_bytes():
|
75
75
|
# Overwrite the offending ForwardMsg.delta with an error to display.
|
76
76
|
# This assumes that the size limit wasn't exceeded due to metadata.
|
77
|
-
|
77
|
+
from streamlit.elements import exception
|
78
78
|
|
79
79
|
msg_size_error = MessageSizeError(msg_str)
|
80
80
|
_LOGGER.warning(
|
@@ -635,7 +635,7 @@ class ScriptRunner:
|
|
635
635
|
# inside of a exec_func_with_error_handling call, so
|
636
636
|
# there is a correct handler for these exceptions.
|
637
637
|
raise e
|
638
|
-
except Exception:
|
638
|
+
except Exception: # noqa: S110
|
639
639
|
# Ignore exceptions raised by fragments here as we don't
|
640
640
|
# want to stop the execution of other fragments. The
|
641
641
|
# error itself is already rendered within the wrapped
|
@@ -645,7 +645,7 @@ class ScriptRunner:
|
|
645
645
|
else:
|
646
646
|
if PagesManager.uses_pages_directory:
|
647
647
|
_mpa_v1(self._main_script_path)
|
648
|
-
exec(code, module.__dict__)
|
648
|
+
exec(code, module.__dict__) # noqa: S102
|
649
649
|
self._fragment_storage.clear(
|
650
650
|
new_fragment_ids=ctx.new_fragment_ids
|
651
651
|
)
|
@@ -742,7 +742,7 @@ def _clean_problem_modules() -> None:
|
|
742
742
|
try:
|
743
743
|
keras = sys.modules["keras"]
|
744
744
|
keras.backend.clear_session()
|
745
|
-
except Exception:
|
745
|
+
except Exception: # noqa: S110
|
746
746
|
# We don't want to crash the app if we can't clear the Keras session.
|
747
747
|
pass
|
748
748
|
|
@@ -750,7 +750,7 @@ def _clean_problem_modules() -> None:
|
|
750
750
|
try:
|
751
751
|
plt = sys.modules["matplotlib.pyplot"]
|
752
752
|
plt.close("all")
|
753
|
-
except Exception:
|
753
|
+
except Exception: # noqa: S110
|
754
754
|
# We don't want to crash the app if we can't close matplotlib
|
755
755
|
pass
|
756
756
|
|
streamlit/static/index.html
CHANGED
@@ -51,7 +51,7 @@
|
|
51
51
|
<script>
|
52
52
|
window.prerenderReady = false
|
53
53
|
</script>
|
54
|
-
<script type="module" crossorigin src="./static/js/index.
|
54
|
+
<script type="module" crossorigin src="./static/js/index.BQqNcnRp.js"></script>
|
55
55
|
<link rel="stylesheet" crossorigin href="./static/css/index.C6rq3aMZ.css">
|
56
56
|
</head>
|
57
57
|
<body>
|
@@ -1 +1 @@
|
|
1
|
-
import{r,E as a,_ as n}from"./index.
|
1
|
+
import{r,E as a,_ as n}from"./index.BQqNcnRp.js";var i=r.forwardRef(function(e,t){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(a,n({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),r.createElement("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))});i.displayName="ErrorOutline";export{i as E};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,E as n,_ as a}from"./index.
|
1
|
+
import{r as e,E as n,_ as a}from"./index.BQqNcnRp.js";var o=e.forwardRef(function(t,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),e.createElement("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}))});o.displayName="Delete";var i=e.forwardRef(function(t,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),e.createElement("rect",{width:24,height:24,fill:"none"}),e.createElement("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4l-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}))});i.displayName="FileDownload";export{o as D,i as F};
|