streamlit-nightly 1.53.1.dev20260117__py3-none-any.whl → 1.53.1.dev20260120__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 CHANGED
@@ -111,7 +111,6 @@ from streamlit.runtime.state import (
111
111
  )
112
112
  from streamlit.user_info import (
113
113
  UserInfoProxy as _UserInfoProxy,
114
- DeprecatedUserInfoProxy as _DeprecatedUserInfoProxy,
115
114
  login as _login,
116
115
  logout as _logout,
117
116
  )
@@ -275,9 +274,6 @@ logout = _logout
275
274
  # User
276
275
  user = _UserInfoProxy()
277
276
 
278
- # Experimental APIs
279
- experimental_user = _DeprecatedUserInfoProxy()
280
-
281
277
  # make it possible to call streamlit.components.v1.html etc. by importing it here
282
278
  # import in the very end to avoid partially-initialized module import errors, because
283
279
  # streamlit.components.v1 also uses some streamlit imports
@@ -1072,8 +1072,10 @@ def is_colum_type_arrow_incompatible(column: Series[Any] | Index[Any]) -> bool:
1072
1072
  return True
1073
1073
 
1074
1074
  if column.dtype == "object":
1075
- # The dtype of mixed type columns is always object, the actual type of the column
1076
- # values can be determined via the infer_dtype function:
1075
+ # The dtype of mixed type columns is always object. In pandas 3.0+, pure
1076
+ # string columns use StringDtype instead of object, so they won't enter
1077
+ # this block (and they're Arrow-compatible anyway). The actual type of
1078
+ # object dtype column values can be determined via the infer_dtype function:
1077
1079
  # https://pandas.pydata.org/docs/reference/api/pandas.api.types.infer_dtype.html
1078
1080
  inferred_type = infer_dtype(column, skipna=True)
1079
1081
 
@@ -611,6 +611,9 @@ def _melt_data(
611
611
 
612
612
  y_series = melted_df[new_y_column_name]
613
613
  if (
614
+ # After melting columns of different dtypes, the result has object dtype.
615
+ # In pandas 3.0+, melting columns with the same StringDtype keeps StringDtype,
616
+ # so this check correctly identifies only truly mixed-type scenarios.
614
617
  y_series.dtype == "object"
615
618
  and "mixed" in infer_dtype(y_series)
616
619
  and len(y_series.unique()) > 100
@@ -255,7 +255,9 @@ def _determine_data_kind_via_pandas_dtype(
255
255
  if pd.api.types.is_object_dtype(
256
256
  column_dtype
257
257
  ) is False and pd.api.types.is_string_dtype(column_dtype):
258
- # The is_string_dtype
258
+ # This handles pandas 3.0+ StringDtype (and PyArrow-backed string types).
259
+ # We exclude object dtype here because object columns with string values
260
+ # are handled via _determine_data_kind_via_inferred_type in the caller.
259
261
  return ColumnDataKind.STRING
260
262
 
261
263
  return ColumnDataKind.UNKNOWN
@@ -539,6 +539,42 @@ def _validate_date_value(
539
539
  return cast("DateWidgetReturn", tuple(parsed_values.value)), True
540
540
 
541
541
 
542
+ def _validate_datetime_value(
543
+ current_value: datetime | None,
544
+ parsed_values: _DateTimeInputValues,
545
+ has_explicit_bounds: bool,
546
+ ) -> tuple[datetime | None, bool]:
547
+ """Validate current datetime value against min/max bounds and determine if reset is needed.
548
+
549
+ Only validates when has_explicit_bounds is True (user provided min_value or max_value).
550
+ This avoids incorrectly determining if reset is needed against computed default bounds.
551
+
552
+ Parameters
553
+ ----------
554
+ current_value : datetime | None
555
+ The current value of the datetime input widget.
556
+ parsed_values : _DateTimeInputValues
557
+ Parsed configuration containing min, max, and default value.
558
+ has_explicit_bounds : bool
559
+ Whether the user explicitly provided min_value or max_value. If False, validation
560
+ is skipped to avoid resetting against computed default bounds.
561
+
562
+ Returns
563
+ -------
564
+ tuple[datetime | None, bool]
565
+ A tuple of (validated_value, was_reset) where validated_value is either the
566
+ original value (if valid) or the default value (if reset was needed), and
567
+ was_reset indicates whether a reset occurred.
568
+ """
569
+ if current_value is None or not has_explicit_bounds:
570
+ return current_value, False
571
+
572
+ if current_value < parsed_values.min or current_value > parsed_values.max:
573
+ return parsed_values.value, True
574
+
575
+ return current_value, False
576
+
577
+
542
578
  @dataclass
543
579
  class DateInputSerde:
544
580
  value: _DateInputValues
@@ -1132,9 +1168,10 @@ class TimeWidgetsMixin:
1132
1168
  element_id = compute_and_register_element_id(
1133
1169
  "date_time_input",
1134
1170
  user_key=key,
1135
- # Ensure stable IDs when the key is provided; whitelist parameters that
1136
- # affect the selectable range or formatting.
1137
- key_as_main_identity={"min_value", "max_value", "format", "step"},
1171
+ # Format is whitelisted because of a bug in the BaseWeb date input component.
1172
+ # Step is whitelisted because it invalidates the current selection.
1173
+ # We might be able to unlock this as a follow-up.
1174
+ key_as_main_identity={"format", "step"},
1138
1175
  dg=self.dg,
1139
1176
  label=label,
1140
1177
  value=value_for_id,
@@ -1145,7 +1182,9 @@ class TimeWidgetsMixin:
1145
1182
  step=step,
1146
1183
  width=width,
1147
1184
  )
1148
- del value
1185
+ # Track if user explicitly set bounds (before del)
1186
+ has_explicit_bounds = min_value is not None or max_value is not None
1187
+ del value, min_value, max_value
1149
1188
 
1150
1189
  if not bool(ALLOWED_DATE_FORMATS.match(format)):
1151
1190
  raise StreamlitAPIException(
@@ -1208,8 +1247,20 @@ class TimeWidgetsMixin:
1208
1247
  value_type="string_array_value",
1209
1248
  )
1210
1249
 
1211
- if widget_state.value_changed:
1212
- date_time_input_proto.value[:] = serde.serialize(widget_state.value)
1250
+ # Validate the current value against the new min/max bounds.
1251
+ # Only validate when user explicitly provided min_value or max_value.
1252
+ current_value, value_needs_reset = _validate_datetime_value(
1253
+ widget_state.value, datetime_values, has_explicit_bounds
1254
+ )
1255
+
1256
+ if value_needs_reset and key is not None:
1257
+ # Update session_state so subsequent accesses in this run
1258
+ # return the corrected value. Use reset_state_value to avoid
1259
+ # the "cannot be modified after widget instantiated" error.
1260
+ get_session_state().reset_state_value(key, current_value)
1261
+
1262
+ if value_needs_reset or widget_state.value_changed:
1263
+ date_time_input_proto.value[:] = serde.serialize(current_value)
1213
1264
  date_time_input_proto.set_value = True
1214
1265
 
1215
1266
  validate_width(width)
@@ -1218,7 +1269,7 @@ class TimeWidgetsMixin:
1218
1269
  self.dg._enqueue(
1219
1270
  "date_time_input", date_time_input_proto, layout_config=layout_config
1220
1271
  )
1221
- return widget_state.value
1272
+ return current_value
1222
1273
 
1223
1274
  @overload
1224
1275
  def date_input(
@@ -54,7 +54,7 @@ def data_frame_demo() -> None:
54
54
  color="Region:N",
55
55
  )
56
56
  )
57
- st.altair_chart(chart, use_container_width=True)
57
+ st.altair_chart(chart, width="stretch")
58
58
  except URLError as e:
59
59
  st.error(f"This demo requires internet access. Connection error: {e.reason}")
60
60
 
streamlit/user_info.py CHANGED
@@ -30,10 +30,6 @@ from streamlit.auth_util import (
30
30
  is_authlib_installed,
31
31
  validate_auth_credentials,
32
32
  )
33
- from streamlit.deprecation_util import (
34
- make_deprecated_name_warning,
35
- show_deprecation_warning,
36
- )
37
33
  from streamlit.errors import StreamlitAPIException, StreamlitAuthError
38
34
  from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
39
35
  from streamlit.runtime.metrics_util import gather_metrics
@@ -701,38 +697,3 @@ class UserInfoProxy(Mapping[str, str | bool | TokensProxy | None]):
701
697
  """Access exposed tokens via a dict-like object."""
702
698
  user_info = _get_user_info()
703
699
  return TokensProxy(cast("dict[str, str]", user_info.get("tokens", {})))
704
-
705
-
706
- has_shown_experimental_user_warning = False
707
-
708
-
709
- def maybe_show_deprecated_user_warning() -> None:
710
- """Show a deprecation warning for the experimental_user alias."""
711
- global has_shown_experimental_user_warning # noqa: PLW0603
712
-
713
- if not has_shown_experimental_user_warning:
714
- has_shown_experimental_user_warning = True
715
- show_deprecation_warning(
716
- make_deprecated_name_warning(
717
- "experimental_user",
718
- "user",
719
- "2025-11-06",
720
- )
721
- )
722
-
723
-
724
- class DeprecatedUserInfoProxy(UserInfoProxy):
725
- """
726
- A deprecated alias for UserInfoProxy.
727
-
728
- This class is deprecated and will be removed in a future version of
729
- Streamlit.
730
- """
731
-
732
- def __getattribute__(self, name: str) -> Any:
733
- maybe_show_deprecated_user_warning()
734
- return super().__getattribute__(name)
735
-
736
- def __getitem__(self, key: str) -> Any:
737
- maybe_show_deprecated_user_warning()
738
- return super().__getitem__(key)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streamlit-nightly
3
- Version: 1.53.1.dev20260117
3
+ Version: 1.53.1.dev20260120
4
4
  Summary: A faster way to build and share data apps
5
5
  Home-page: https://streamlit.io
6
6
  Author: Snowflake Inc
@@ -1,4 +1,4 @@
1
- streamlit/__init__.py,sha256=GwzGIKXNIRqam2Ne2jAkiwZwGqPWcskY39GjvqYT0JE,8959
1
+ streamlit/__init__.py,sha256=L-CP-Bf5LKgzxI1S6_ZEu9aNCynOwoD9o8VTC6Xouqs,8834
2
2
  streamlit/__main__.py,sha256=4vltvfI348h2yIOUohsc2DtG-lclcjCAdR1mewGeMck,868
3
3
  streamlit/auth_util.py,sha256=moJJsStbM3bGlZIrEhUt1Z2WsTYjJAUmbBOKIJTvY3g,20777
4
4
  streamlit/cli_util.py,sha256=IZoQ-9rC2_rBDYjmGvbC7LsI1naiF7yvP9LotDjjGrk,3507
@@ -7,7 +7,7 @@ streamlit/config.py,sha256=JpCDszf4gXWmhkLkEEDzyVqwThdZTnxdfe3xVa3tLDI,89960
7
7
  streamlit/config_option.py,sha256=d8PJubac9JS7G99w1N4_0er8sJ4DzyA_mqoy0n1XrRI,11744
8
8
  streamlit/config_util.py,sha256=kcH7Tqbd-r1sWBe_ck-T9-65lpWDXblg3ZKzGhZc_ws,30918
9
9
  streamlit/cursor.py,sha256=M8b92hMFV76FL0A8aa6wfe5NI5gsbldn_VvRQ6J0Is0,9425
10
- streamlit/dataframe_util.py,sha256=6V4pe6a5ihAg-G0nlCgzu_haUa8YE22RCBAKj0XQIwI,49600
10
+ streamlit/dataframe_util.py,sha256=4Z_ovWyb27FQ0iUIJ2CTaLQHFNlxId3MYrmtECldsXg,49770
11
11
  streamlit/delta_generator.py,sha256=8KqXS9CHhkdYczGYzCcfrRQ6tQ-mvda0vhWyCc0MeWI,25649
12
12
  streamlit/delta_generator_singletons.py,sha256=jFQbwHjJO19eaofXyPkv2ZKcqkTPNfPgPS2Nc2NWiOM,7596
13
13
  streamlit/deprecation_util.py,sha256=n-4c9vOr4hqkjXq8GijzCguNy8sG2Wi9QigjC7Mhci8,7731
@@ -30,7 +30,7 @@ streamlit/temporary_directory.py,sha256=EWGVi2kkoIgiKK_GfU-A763c7QkpcHoAOJrKPyqW
30
30
  streamlit/time_util.py,sha256=vXszmS-05FXEydBSjDjTw4WZ9Q7n8J23tC77cWbTDeA,2493
31
31
  streamlit/type_util.py,sha256=Wm3KYcsCzZ4MTLRXjf2BSr_MIESbsQBE2x9PG2XisQE,13885
32
32
  streamlit/url_util.py,sha256=zvLkmFI_rXMAGAn3W_mk3xQon_TXztqZT9kJ0EbsE8A,3433
33
- streamlit/user_info.py,sha256=7d909GH0yICz0uxV-8o72JT9d9RnAIjzvM8CNpivDng,27107
33
+ streamlit/user_info.py,sha256=h-nOM-JxwWFVKqXTExwmys4OBGUDwzd7-ibNhcmgwq4,26011
34
34
  streamlit/util.py,sha256=1Wx8LjfZPlfJbdb9FSSEZPKCpK8IM3WXQFPh7Yw0_Lg,3642
35
35
  streamlit/version.py,sha256=Ume7B4nzDwHGX6gL-F-Xz9tdHMo0YSn96vyNdnHzvVg,763
36
36
  streamlit/commands/__init__.py,sha256=iZwXNLk8xCKTqIiR1dIs0i-phfx1ipLkhGasCEwkD2Q,616
@@ -107,9 +107,9 @@ streamlit/elements/toast.py,sha256=5CIE4IRfAe8MQtFpDP8eqmxf3fDgyQn4iBAZwXNBjdI,6
107
107
  streamlit/elements/vega_charts.py,sha256=h-iarYzqT3LJV5aysUlkY_VSAOv4NT30Ix_4P_-fyV0,103087
108
108
  streamlit/elements/write.py,sha256=JEwXofDVRT0_SNT6Y9ddi5d7P-B0m6kt-bNWlK-pji0,23032
109
109
  streamlit/elements/lib/__init__.py,sha256=iZwXNLk8xCKTqIiR1dIs0i-phfx1ipLkhGasCEwkD2Q,616
110
- streamlit/elements/lib/built_in_chart_utils.py,sha256=g-XcWNOpvJyWsJTf-q-dGVbNmQQbX4HLuPYh_xAgdDQ,43832
110
+ streamlit/elements/lib/built_in_chart_utils.py,sha256=ASNcunamUId3UrbTwI8rkEkssy_1AkLxPDXmNzsCqzU,44079
111
111
  streamlit/elements/lib/color_util.py,sha256=7dC70zBt9WjEndaH9BN5STQ0u8R9sJb3u2yTcEsNTNE,8854
112
- streamlit/elements/lib/column_config_utils.py,sha256=jUtfgcKMyl_JRHHceKX7opFGGuHUIGTGf62yuCpFtJA,16754
112
+ streamlit/elements/lib/column_config_utils.py,sha256=bExYF69tv0plzxAubt1b4zBj3bPsQlz2xyroha8siXE,16967
113
113
  streamlit/elements/lib/column_types.py,sha256=2NB1TQH-1ICWgv0TTNGpLdg6NaLE7Jzkqf6_-awN95w,97248
114
114
  streamlit/elements/lib/dialog.py,sha256=wjJNw2PXUOG4_pt_qWlT0U_C2cOTrZJvJIDFOSPo7jo,8280
115
115
  streamlit/elements/lib/dicttools.py,sha256=KAjDDQnW6pEZBZtTdmk1DfwL6b1c7u4eEzAIvIVxnCM,3894
@@ -143,13 +143,13 @@ streamlit/elements/widgets/select_slider.py,sha256=9vG5TdN2ELxzDt9pLz8nXIGYBlOgq
143
143
  streamlit/elements/widgets/selectbox.py,sha256=yQk8aa2Leu2eYl0eahQqNp1cieebhffG8iHWfrSpDG4,23084
144
144
  streamlit/elements/widgets/slider.py,sha256=2oUQv-DQaR07OzlvSZsKcEzLxS8mdo4GQPHgq9CNTj0,40050
145
145
  streamlit/elements/widgets/text_widgets.py,sha256=GNPemFOxCJSh6tSs7i55tLPkpRaOyI57c_KMAWyvcuU,26671
146
- streamlit/elements/widgets/time_widgets.py,sha256=twRehEHIoNR866KGhJ0cmBcXBcL2y9gE5Rbyj6qvZ78,61320
146
+ streamlit/elements/widgets/time_widgets.py,sha256=Wce4_3IyBFQ5h8SmTLuXghlhRRGUBb0sWZKYs0DsToU,63600
147
147
  streamlit/external/__init__.py,sha256=iZwXNLk8xCKTqIiR1dIs0i-phfx1ipLkhGasCEwkD2Q,616
148
148
  streamlit/external/langchain/__init__.py,sha256=8_dhMjwMNpii6SZiQR8iqIfU6jvchCx4tcsFkF4c7QA,814
149
149
  streamlit/external/langchain/streamlit_callback_handler.py,sha256=I6s0nWUDB6nybJN7-LgpFbTWwQMOwpYpXL6EibvnnEE,15628
150
150
  streamlit/hello/__init__.py,sha256=iZwXNLk8xCKTqIiR1dIs0i-phfx1ipLkhGasCEwkD2Q,616
151
151
  streamlit/hello/animation_demo.py,sha256=wI_M05ileT3fCu6vI0i2r6hJE0fhIifKTrO6LcNHKzY,3022
152
- streamlit/hello/dataframe_demo.py,sha256=e0MHK--YyUR-MxQie0BXAXkWN6y3iliK868T-dASSKA,2484
152
+ streamlit/hello/dataframe_demo.py,sha256=6rYEyBEzA3f8u0EPsESfk0zr3jrpBfd_IQPjmiPRcBg,2475
153
153
  streamlit/hello/hello.py,sha256=zQmHOqRdirL6Kqq3ISs3YtTwlaWjmve2XiDJ72DQCmQ,1875
154
154
  streamlit/hello/mapping_demo.py,sha256=glRGVYCL7l2oze86IYnnhvtJWNtsjBi0LDPXRD5hyG0,3744
155
155
  streamlit/hello/plotting_demo.py,sha256=cdkQoohPlAzfafKQnSveCEEuGsLsNgkKmvh5eINQ8Zk,1772
@@ -633,9 +633,9 @@ streamlit/web/server/starlette/starlette_server.py,sha256=D3TFu-vzuyOXF3f7qdMbx5
633
633
  streamlit/web/server/starlette/starlette_server_config.py,sha256=_cgub_NiTO-52etLfEMIoe5bWgA3TVianT2mYCVQmqo,2508
634
634
  streamlit/web/server/starlette/starlette_static_routes.py,sha256=sDLGRlIvFCBQieXOf0BmueYVP3KJTfvGy-ux3Tk4D6E,7547
635
635
  streamlit/web/server/starlette/starlette_websocket.py,sha256=f64fojwihK7XXIfYT4HGNLd1TPZJMT7JEK43h4ScDAg,21338
636
- streamlit_nightly-1.53.1.dev20260117.data/scripts/streamlit.cmd,sha256=es_jE8w9dt6l9DA40xFlQjGJeVq1Of8rDJQNibPUlEA,676
637
- streamlit_nightly-1.53.1.dev20260117.dist-info/METADATA,sha256=LUfF-SekBAaURLXUalFI9k3qwMbc6uz4pH53UlV88lo,10214
638
- streamlit_nightly-1.53.1.dev20260117.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
639
- streamlit_nightly-1.53.1.dev20260117.dist-info/entry_points.txt,sha256=uNJ4DwGNXEhOK0USwSNanjkYyR-Bk7eYQbJFDrWyOgY,53
640
- streamlit_nightly-1.53.1.dev20260117.dist-info/top_level.txt,sha256=V3FhKbm7G2LnR0s4SytavrjIPNIhvcsAGXfYHAwtQzw,10
641
- streamlit_nightly-1.53.1.dev20260117.dist-info/RECORD,,
636
+ streamlit_nightly-1.53.1.dev20260120.data/scripts/streamlit.cmd,sha256=es_jE8w9dt6l9DA40xFlQjGJeVq1Of8rDJQNibPUlEA,676
637
+ streamlit_nightly-1.53.1.dev20260120.dist-info/METADATA,sha256=Hihu_iiNk3Nh08Sk86DAD2ajomvvWHA_ceG-1dE1vQE,10214
638
+ streamlit_nightly-1.53.1.dev20260120.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
639
+ streamlit_nightly-1.53.1.dev20260120.dist-info/entry_points.txt,sha256=uNJ4DwGNXEhOK0USwSNanjkYyR-Bk7eYQbJFDrWyOgY,53
640
+ streamlit_nightly-1.53.1.dev20260120.dist-info/top_level.txt,sha256=V3FhKbm7G2LnR0s4SytavrjIPNIhvcsAGXfYHAwtQzw,10
641
+ streamlit_nightly-1.53.1.dev20260120.dist-info/RECORD,,