flet 0.70.0.dev6425__py3-none-any.whl → 0.70.0.dev6475__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.
Potentially problematic release.
This version of flet might be problematic. Click here for more details.
- flet/components/observable.py +2 -3
- flet/controls/colors.py +41 -15
- flet/controls/core/list_view.py +14 -0
- flet/controls/object_patch.py +12 -9
- flet/controls/theme.py +41 -17
- flet/messaging/protocol.py +1 -1
- flet/utils/__init__.py +19 -17
- flet/utils/deprecated_enum.py +40 -0
- flet/version.py +1 -1
- {flet-0.70.0.dev6425.dist-info → flet-0.70.0.dev6475.dist-info}/METADATA +1 -1
- {flet-0.70.0.dev6425.dist-info → flet-0.70.0.dev6475.dist-info}/RECORD +14 -13
- {flet-0.70.0.dev6425.dist-info → flet-0.70.0.dev6475.dist-info}/WHEEL +0 -0
- {flet-0.70.0.dev6425.dist-info → flet-0.70.0.dev6475.dist-info}/entry_points.txt +0 -0
- {flet-0.70.0.dev6425.dist-info → flet-0.70.0.dev6475.dist-info}/top_level.txt +0 -0
flet/components/observable.py
CHANGED
|
@@ -147,10 +147,9 @@ class Observable:
|
|
|
147
147
|
object.__setattr__(self, name, value)
|
|
148
148
|
return
|
|
149
149
|
value = self._wrap_if_collection(name, value)
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
old = object.__getattribute__(self, name) if hasattr(self, name) else None
|
|
151
|
+
object.__setattr__(self, name, value)
|
|
152
152
|
if not value_equal(old, value):
|
|
153
|
-
object.__setattr__(self, name, value)
|
|
154
153
|
self._notify(name)
|
|
155
154
|
|
|
156
155
|
def __delattr__(self, name: str):
|
flet/controls/colors.py
CHANGED
|
@@ -55,13 +55,15 @@ import random
|
|
|
55
55
|
from enum import Enum
|
|
56
56
|
from typing import TYPE_CHECKING, Optional, Union
|
|
57
57
|
|
|
58
|
+
from flet.utils.deprecated_enum import DeprecatedEnumMeta
|
|
59
|
+
|
|
58
60
|
if TYPE_CHECKING:
|
|
59
61
|
from flet.controls.types import ColorValue
|
|
60
62
|
|
|
61
63
|
__all__ = ["Colors"]
|
|
62
64
|
|
|
63
65
|
|
|
64
|
-
class Colors(str, Enum):
|
|
66
|
+
class Colors(str, Enum, metaclass=DeprecatedEnumMeta):
|
|
65
67
|
def __eq__(self, other):
|
|
66
68
|
if isinstance(other, str):
|
|
67
69
|
return self.value.lower() == other.lower()
|
|
@@ -198,12 +200,12 @@ class Colors(str, Enum):
|
|
|
198
200
|
AMBER_ACCENT_400 = "amberaccent400"
|
|
199
201
|
AMBER_ACCENT_700 = "amberaccent700"
|
|
200
202
|
BLACK = "black"
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
203
|
+
BLACK_12 = "black12"
|
|
204
|
+
BLACK_26 = "black26"
|
|
205
|
+
BLACK_38 = "black38"
|
|
206
|
+
BLACK_45 = "black45"
|
|
207
|
+
BLACK_54 = "black54"
|
|
208
|
+
BLACK_87 = "black87"
|
|
207
209
|
BLUE = "blue"
|
|
208
210
|
BLUE_100 = "blue100"
|
|
209
211
|
BLUE_200 = "blue200"
|
|
@@ -463,14 +465,14 @@ class Colors(str, Enum):
|
|
|
463
465
|
TEAL_ACCENT_700 = "tealaccent700"
|
|
464
466
|
TRANSPARENT = "transparent"
|
|
465
467
|
WHITE = "white"
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
468
|
+
WHITE_10 = "white10"
|
|
469
|
+
WHITE_12 = "white12"
|
|
470
|
+
WHITE_24 = "white24"
|
|
471
|
+
WHITE_30 = "white30"
|
|
472
|
+
WHITE_38 = "white38"
|
|
473
|
+
WHITE_54 = "white54"
|
|
474
|
+
WHITE_60 = "white60"
|
|
475
|
+
WHITE_70 = "white70"
|
|
474
476
|
YELLOW = "yellow"
|
|
475
477
|
YELLOW_100 = "yellow100"
|
|
476
478
|
YELLOW_200 = "yellow200"
|
|
@@ -487,3 +489,27 @@ class Colors(str, Enum):
|
|
|
487
489
|
YELLOW_ACCENT_200 = "yellowaccent200"
|
|
488
490
|
YELLOW_ACCENT_400 = "yellowaccent400"
|
|
489
491
|
YELLOW_ACCENT_700 = "yellowaccent700"
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
# TODO - remove in Flet 1.0
|
|
495
|
+
_DEPRECATED_COLOR_ALIASES = {
|
|
496
|
+
"BLACK12": ("BLACK_12", "Use Colors.BLACK_12 instead."),
|
|
497
|
+
"BLACK26": ("BLACK_26", "Use Colors.BLACK_26 instead."),
|
|
498
|
+
"BLACK38": ("BLACK_38", "Use Colors.BLACK_38 instead."),
|
|
499
|
+
"BLACK45": ("BLACK_45", "Use Colors.BLACK_45 instead."),
|
|
500
|
+
"BLACK54": ("BLACK_54", "Use Colors.BLACK_54 instead."),
|
|
501
|
+
"BLACK87": ("BLACK_87", "Use Colors.BLACK_87 instead."),
|
|
502
|
+
"WHITE10": ("WHITE_10", "Use Colors.WHITE_10 instead."),
|
|
503
|
+
"WHITE12": ("WHITE_12", "Use Colors.WHITE_12 instead."),
|
|
504
|
+
"WHITE24": ("WHITE_24", "Use Colors.WHITE_24 instead."),
|
|
505
|
+
"WHITE30": ("WHITE_30", "Use Colors.WHITE_30 instead."),
|
|
506
|
+
"WHITE38": ("WHITE_38", "Use Colors.WHITE_38 instead."),
|
|
507
|
+
"WHITE54": ("WHITE_54", "Use Colors.WHITE_54 instead."),
|
|
508
|
+
"WHITE60": ("WHITE_60", "Use Colors.WHITE_60 instead."),
|
|
509
|
+
"WHITE70": ("WHITE_70", "Use Colors.WHITE_70 instead."),
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
Colors._deprecated_members_ = _DEPRECATED_COLOR_ALIASES
|
|
513
|
+
|
|
514
|
+
for alias_name, (target_name, _) in _DEPRECATED_COLOR_ALIASES.items():
|
|
515
|
+
Colors._member_map_[alias_name] = getattr(Colors, target_name)
|
flet/controls/core/list_view.py
CHANGED
|
@@ -54,6 +54,10 @@ class ListView(LayoutControl, ScrollableControl, AdaptiveControl):
|
|
|
54
54
|
"""
|
|
55
55
|
A fixed height or width (when [`horizontal`][(c).] is `True`)
|
|
56
56
|
of an item to optimize rendering.
|
|
57
|
+
|
|
58
|
+
Note:
|
|
59
|
+
This property has effect only when [`build_controls_on_demand`][(c).]
|
|
60
|
+
is `True` or [`spacing`][(c).] is `0`.
|
|
57
61
|
"""
|
|
58
62
|
|
|
59
63
|
first_item_prototype: bool = False
|
|
@@ -63,6 +67,16 @@ class ListView(LayoutControl, ScrollableControl, AdaptiveControl):
|
|
|
63
67
|
i.e. their `height` or `width` will be the same as the first item.
|
|
64
68
|
"""
|
|
65
69
|
|
|
70
|
+
prototype_item: Optional[Control] = None
|
|
71
|
+
"""
|
|
72
|
+
A control to be used as a "prototype" for all items,
|
|
73
|
+
i.e. their `height` or `width` will be the same as the `prototype_item`.
|
|
74
|
+
|
|
75
|
+
Note:
|
|
76
|
+
This property has effect only when [`build_controls_on_demand`][(c).]
|
|
77
|
+
is `True` or [`spacing`][(c).] is `0`.
|
|
78
|
+
"""
|
|
79
|
+
|
|
66
80
|
divider_thickness: Number = 0
|
|
67
81
|
"""
|
|
68
82
|
If greater than `0` then `Divider` is used as a spacing between list view items.
|
flet/controls/object_patch.py
CHANGED
|
@@ -890,6 +890,12 @@ class DiffBuilder:
|
|
|
890
890
|
old = change[0]
|
|
891
891
|
new = change[1]
|
|
892
892
|
|
|
893
|
+
if field_name.startswith("on_") and fields[field_name].metadata.get(
|
|
894
|
+
"event", True
|
|
895
|
+
):
|
|
896
|
+
old = old is not None
|
|
897
|
+
new = new is not None
|
|
898
|
+
|
|
893
899
|
logger.debug("\n\n_compare_values:changes %s %s", old, new)
|
|
894
900
|
|
|
895
901
|
self._compare_values(dst, path, field_name, old, new, frozen)
|
|
@@ -963,7 +969,9 @@ class DiffBuilder:
|
|
|
963
969
|
if "skip" not in field.metadata:
|
|
964
970
|
old = getattr(src, field.name)
|
|
965
971
|
new = getattr(dst, field.name)
|
|
966
|
-
if field.name.startswith("on_")
|
|
972
|
+
if field.name.startswith("on_") and field.metadata.get(
|
|
973
|
+
"event", True
|
|
974
|
+
):
|
|
967
975
|
old = old is not None
|
|
968
976
|
new = new is not None
|
|
969
977
|
self._compare_values(dst, path, field.name, old, new, frozen)
|
|
@@ -1126,20 +1134,15 @@ class DiffBuilder:
|
|
|
1126
1134
|
|
|
1127
1135
|
if hasattr(obj, "__changes"):
|
|
1128
1136
|
old_value = getattr(obj, name, None)
|
|
1129
|
-
if
|
|
1130
|
-
old_value = old_value is not None
|
|
1131
|
-
new_value = (
|
|
1132
|
-
value if not name.startswith("on_") else value is not None
|
|
1133
|
-
)
|
|
1134
|
-
if old_value != new_value:
|
|
1137
|
+
if old_value != value:
|
|
1135
1138
|
# logger.debug(
|
|
1136
1139
|
# f"\n\nset_attr: {obj.__class__.__name__}.{name} = "
|
|
1137
1140
|
# f"{new_value}, old: {old_value}"
|
|
1138
1141
|
# )
|
|
1139
1142
|
changes = getattr(obj, "__changes")
|
|
1140
|
-
changes[name] = (old_value,
|
|
1143
|
+
changes[name] = (old_value, value)
|
|
1141
1144
|
if hasattr(obj, "_notify"):
|
|
1142
|
-
obj._notify(name,
|
|
1145
|
+
obj._notify(name, value)
|
|
1143
1146
|
object.__setattr__(obj, name, value)
|
|
1144
1147
|
|
|
1145
1148
|
item.__class__.__setattr__ = control_setattr # type: ignore
|
flet/controls/theme.py
CHANGED
|
@@ -75,7 +75,7 @@ class ColorScheme:
|
|
|
75
75
|
The color displayed most frequently across your app's screens and components.
|
|
76
76
|
"""
|
|
77
77
|
|
|
78
|
-
on_primary: Optional[ColorValue] = None
|
|
78
|
+
on_primary: Optional[ColorValue] = field(default=None, metadata={"event": False})
|
|
79
79
|
"""
|
|
80
80
|
A color that's clearly legible when drawn on `primary`.
|
|
81
81
|
"""
|
|
@@ -85,7 +85,9 @@ class ColorScheme:
|
|
|
85
85
|
A color used for elements needing less emphasis than `primary`.
|
|
86
86
|
"""
|
|
87
87
|
|
|
88
|
-
on_primary_container: Optional[ColorValue] =
|
|
88
|
+
on_primary_container: Optional[ColorValue] = field(
|
|
89
|
+
default=None, metadata={"event": False}
|
|
90
|
+
)
|
|
89
91
|
"""
|
|
90
92
|
A color that's clearly legible when drawn on `primary_container`.
|
|
91
93
|
"""
|
|
@@ -96,7 +98,7 @@ class ColorScheme:
|
|
|
96
98
|
while expanding the opportunity for color expression.
|
|
97
99
|
"""
|
|
98
100
|
|
|
99
|
-
on_secondary: Optional[ColorValue] = None
|
|
101
|
+
on_secondary: Optional[ColorValue] = field(default=None, metadata={"event": False})
|
|
100
102
|
"""
|
|
101
103
|
A color that's clearly legible when drawn on `secondary`.
|
|
102
104
|
"""
|
|
@@ -106,7 +108,9 @@ class ColorScheme:
|
|
|
106
108
|
A color used for elements needing less emphasis than `secondary`.
|
|
107
109
|
"""
|
|
108
110
|
|
|
109
|
-
on_secondary_container: Optional[ColorValue] =
|
|
111
|
+
on_secondary_container: Optional[ColorValue] = field(
|
|
112
|
+
default=None, metadata={"event": False}
|
|
113
|
+
)
|
|
110
114
|
"""
|
|
111
115
|
A color that's clearly legible when drawn on `secondary_container`.
|
|
112
116
|
"""
|
|
@@ -117,7 +121,7 @@ class ColorScheme:
|
|
|
117
121
|
colors or bring heightened attention to an element, such as an input field.
|
|
118
122
|
"""
|
|
119
123
|
|
|
120
|
-
on_tertiary: Optional[ColorValue] = None
|
|
124
|
+
on_tertiary: Optional[ColorValue] = field(default=None, metadata={"event": False})
|
|
121
125
|
"""
|
|
122
126
|
A color that's clearly legible when drawn on `tertiary`.
|
|
123
127
|
"""
|
|
@@ -127,7 +131,9 @@ class ColorScheme:
|
|
|
127
131
|
A color used for elements needing less emphasis than `tertiary`.
|
|
128
132
|
"""
|
|
129
133
|
|
|
130
|
-
on_tertiary_container: Optional[ColorValue] =
|
|
134
|
+
on_tertiary_container: Optional[ColorValue] = field(
|
|
135
|
+
default=None, metadata={"event": False}
|
|
136
|
+
)
|
|
131
137
|
"""
|
|
132
138
|
A color that's clearly legible when drawn on `tertiary_container`.
|
|
133
139
|
"""
|
|
@@ -137,7 +143,7 @@ class ColorScheme:
|
|
|
137
143
|
The color to use for input validation errors, e.g. for `TextField.error_text`.
|
|
138
144
|
"""
|
|
139
145
|
|
|
140
|
-
on_error: Optional[ColorValue] = None
|
|
146
|
+
on_error: Optional[ColorValue] = field(default=None, metadata={"event": False})
|
|
141
147
|
"""
|
|
142
148
|
A color that's clearly legible when drawn on `error`.
|
|
143
149
|
"""
|
|
@@ -147,7 +153,9 @@ class ColorScheme:
|
|
|
147
153
|
A color used for error elements needing less emphasis than `error`.
|
|
148
154
|
"""
|
|
149
155
|
|
|
150
|
-
on_error_container: Optional[ColorValue] =
|
|
156
|
+
on_error_container: Optional[ColorValue] = field(
|
|
157
|
+
default=None, metadata={"event": False}
|
|
158
|
+
)
|
|
151
159
|
"""
|
|
152
160
|
A color that's clearly legible when drawn on `error_container`.
|
|
153
161
|
"""
|
|
@@ -157,12 +165,14 @@ class ColorScheme:
|
|
|
157
165
|
The background color for widgets like `Card`.
|
|
158
166
|
"""
|
|
159
167
|
|
|
160
|
-
on_surface: Optional[ColorValue] = None
|
|
168
|
+
on_surface: Optional[ColorValue] = field(default=None, metadata={"event": False})
|
|
161
169
|
"""
|
|
162
170
|
A color that's clearly legible when drawn on `surface`.
|
|
163
171
|
"""
|
|
164
172
|
|
|
165
|
-
on_surface_variant: Optional[ColorValue] =
|
|
173
|
+
on_surface_variant: Optional[ColorValue] = field(
|
|
174
|
+
default=None, metadata={"event": False}
|
|
175
|
+
)
|
|
166
176
|
"""
|
|
167
177
|
A color that's clearly legible when drawn on `surface_variant`.
|
|
168
178
|
"""
|
|
@@ -194,7 +204,9 @@ class ColorScheme:
|
|
|
194
204
|
UI, for example in a `SnackBar` to bring attention to an alert.
|
|
195
205
|
"""
|
|
196
206
|
|
|
197
|
-
on_inverse_surface: Optional[ColorValue] =
|
|
207
|
+
on_inverse_surface: Optional[ColorValue] = field(
|
|
208
|
+
default=None, metadata={"event": False}
|
|
209
|
+
)
|
|
198
210
|
"""
|
|
199
211
|
A color that's clearly legible when drawn on `inverse_surface`.
|
|
200
212
|
"""
|
|
@@ -210,37 +222,49 @@ class ColorScheme:
|
|
|
210
222
|
A color used as an overlay on a surface color to indicate a component's elevation.
|
|
211
223
|
"""
|
|
212
224
|
|
|
213
|
-
on_primary_fixed: Optional[ColorValue] =
|
|
225
|
+
on_primary_fixed: Optional[ColorValue] = field(
|
|
226
|
+
default=None, metadata={"event": False}
|
|
227
|
+
)
|
|
214
228
|
"""
|
|
215
229
|
A color that is used for text and icons that exist on top of elements having
|
|
216
230
|
`primary_fixed` color.
|
|
217
231
|
"""
|
|
218
232
|
|
|
219
|
-
on_secondary_fixed: Optional[ColorValue] =
|
|
233
|
+
on_secondary_fixed: Optional[ColorValue] = field(
|
|
234
|
+
default=None, metadata={"event": False}
|
|
235
|
+
)
|
|
220
236
|
"""
|
|
221
237
|
A color that is used for text and icons that exist on top of elements having
|
|
222
238
|
`secondary_fixed` color.
|
|
223
239
|
"""
|
|
224
240
|
|
|
225
|
-
on_tertiary_fixed: Optional[ColorValue] =
|
|
241
|
+
on_tertiary_fixed: Optional[ColorValue] = field(
|
|
242
|
+
default=None, metadata={"event": False}
|
|
243
|
+
)
|
|
226
244
|
"""
|
|
227
245
|
A color that is used for text and icons that exist on top of elements having
|
|
228
246
|
`tertiary_fixed` color.
|
|
229
247
|
"""
|
|
230
248
|
|
|
231
|
-
on_primary_fixed_variant: Optional[ColorValue] =
|
|
249
|
+
on_primary_fixed_variant: Optional[ColorValue] = field(
|
|
250
|
+
default=None, metadata={"event": False}
|
|
251
|
+
)
|
|
232
252
|
"""
|
|
233
253
|
A color that provides a lower-emphasis option for text and icons than
|
|
234
254
|
`on_primary_fixed`.
|
|
235
255
|
"""
|
|
236
256
|
|
|
237
|
-
on_secondary_fixed_variant: Optional[ColorValue] =
|
|
257
|
+
on_secondary_fixed_variant: Optional[ColorValue] = field(
|
|
258
|
+
default=None, metadata={"event": False}
|
|
259
|
+
)
|
|
238
260
|
"""
|
|
239
261
|
A color that provides a lower-emphasis option for text and icons than
|
|
240
262
|
`on_secondary_fixed`.
|
|
241
263
|
"""
|
|
242
264
|
|
|
243
|
-
on_tertiary_fixed_variant: Optional[ColorValue] =
|
|
265
|
+
on_tertiary_fixed_variant: Optional[ColorValue] = field(
|
|
266
|
+
default=None, metadata={"event": False}
|
|
267
|
+
)
|
|
244
268
|
"""
|
|
245
269
|
A color that provides a lower-emphasis option for text and icons than
|
|
246
270
|
`on_tertiary_fixed`.
|
flet/messaging/protocol.py
CHANGED
|
@@ -29,7 +29,7 @@ def configure_encode_object_for_msgpack(control_cls):
|
|
|
29
29
|
if len(v) > 0:
|
|
30
30
|
r[field.name] = v
|
|
31
31
|
prev_dicts[field.name] = v
|
|
32
|
-
elif field.name.startswith("on_"):
|
|
32
|
+
elif field.name.startswith("on_") and field.metadata.get("event", True):
|
|
33
33
|
v = v is not None
|
|
34
34
|
if v:
|
|
35
35
|
r[field.name] = v
|
flet/utils/__init__.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from flet.utils.browser import open_in_browser
|
|
2
2
|
from flet.utils.classproperty import classproperty
|
|
3
3
|
from flet.utils.deprecated import deprecated, deprecated_class, deprecated_warning
|
|
4
|
+
from flet.utils.deprecated_enum import DeprecatedEnumMeta
|
|
4
5
|
from flet.utils.files import (
|
|
5
6
|
cleanup_path,
|
|
6
7
|
copy_tree,
|
|
@@ -35,27 +36,23 @@ from flet.utils.strings import random_string
|
|
|
35
36
|
from flet.utils.vector import Vector
|
|
36
37
|
|
|
37
38
|
__all__ = [
|
|
38
|
-
"
|
|
39
|
+
"DeprecatedEnumMeta",
|
|
40
|
+
"Once",
|
|
41
|
+
"Vector",
|
|
42
|
+
"calculate_file_hash",
|
|
39
43
|
"classproperty",
|
|
44
|
+
"cleanup_path",
|
|
45
|
+
"copy_tree",
|
|
40
46
|
"deprecated",
|
|
41
47
|
"deprecated_class",
|
|
42
48
|
"deprecated_warning",
|
|
43
|
-
"cleanup_path",
|
|
44
|
-
"copy_tree",
|
|
45
|
-
"get_current_script_dir",
|
|
46
|
-
"is_within_directory",
|
|
47
|
-
"safe_tar_extractall",
|
|
48
|
-
"which",
|
|
49
49
|
"from_dict",
|
|
50
|
-
"calculate_file_hash",
|
|
51
|
-
"sha1",
|
|
52
|
-
"to_json",
|
|
53
|
-
"get_free_tcp_port",
|
|
54
|
-
"get_local_ip",
|
|
55
|
-
"Once",
|
|
56
|
-
"patch_dataclass",
|
|
57
50
|
"get_arch",
|
|
58
51
|
"get_bool_env_var",
|
|
52
|
+
"get_current_script_dir",
|
|
53
|
+
"get_free_tcp_port",
|
|
54
|
+
"get_local_ip",
|
|
55
|
+
"get_param_count",
|
|
59
56
|
"get_platform",
|
|
60
57
|
"is_android",
|
|
61
58
|
"is_asyncio",
|
|
@@ -67,8 +64,13 @@ __all__ = [
|
|
|
67
64
|
"is_mobile",
|
|
68
65
|
"is_pyodide",
|
|
69
66
|
"is_windows",
|
|
70
|
-
"
|
|
67
|
+
"is_within_directory",
|
|
68
|
+
"open_in_browser",
|
|
69
|
+
"patch_dataclass",
|
|
71
70
|
"random_string",
|
|
72
|
-
"
|
|
73
|
-
"
|
|
71
|
+
"safe_tar_extractall",
|
|
72
|
+
"sha1",
|
|
73
|
+
"slugify",
|
|
74
|
+
"to_json",
|
|
75
|
+
"which",
|
|
74
76
|
]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import warnings
|
|
4
|
+
from enum import EnumMeta
|
|
5
|
+
|
|
6
|
+
__all__ = ["DeprecatedEnumMeta"]
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DeprecatedEnumMeta(EnumMeta):
|
|
10
|
+
"""Enum metaclass that supports deprecation aliases.
|
|
11
|
+
|
|
12
|
+
Enums can declare `_deprecated_members_` as a mapping of alias name to a tuple
|
|
13
|
+
containing the canonical member name and a deprecation message. Accessing an alias
|
|
14
|
+
returns the canonical member while emitting a `DeprecationWarning`.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
def _resolve_deprecated(cls, name: str):
|
|
18
|
+
deprecated = getattr(cls, "_deprecated_members_", {})
|
|
19
|
+
info = deprecated.get(name)
|
|
20
|
+
if not info:
|
|
21
|
+
return None
|
|
22
|
+
target_name, message = info
|
|
23
|
+
warnings.warn(
|
|
24
|
+
f"{cls.__name__}.{name} is deprecated. {message}",
|
|
25
|
+
DeprecationWarning,
|
|
26
|
+
stacklevel=2,
|
|
27
|
+
)
|
|
28
|
+
return getattr(cls, target_name)
|
|
29
|
+
|
|
30
|
+
def __getattr__(cls, name: str):
|
|
31
|
+
member = cls._resolve_deprecated(name)
|
|
32
|
+
if member is not None:
|
|
33
|
+
return member
|
|
34
|
+
return super().__getattr__(name)
|
|
35
|
+
|
|
36
|
+
def __getitem__(cls, name: str):
|
|
37
|
+
member = cls._resolve_deprecated(name)
|
|
38
|
+
if member is not None:
|
|
39
|
+
return member
|
|
40
|
+
return super().__getitem__(name)
|
flet/version.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
flet/__init__.py,sha256=39Ci10DOyWcl-9adUYDbIX7eR0PHsRELpESPQZnCw9M,26200
|
|
2
2
|
flet/app.py,sha256=HSws0Zm4ZO0-Hp2P9h7xirCVnRkKCVXhuekyAXT_9Fo,11883
|
|
3
3
|
flet/cli.py,sha256=IUM25fY_sqMtl0hlQGhlMQaBb1oNyO0VZeeBgRodhuA,204
|
|
4
|
-
flet/version.py,sha256=
|
|
4
|
+
flet/version.py,sha256=CBIuRgTZvnqG0srXWy_IgQL2X-BX_qqpqdflnxynm_E,2512
|
|
5
5
|
flet/auth/__init__.py,sha256=eDqmi0Ki8Resd198S7XxgYa2R14wnNqIXnYhBLPl8fQ,289
|
|
6
6
|
flet/auth/authorization.py,sha256=hP_36RiRPtSwmK_Yp6MMzAjQdDxbBiEcZ2yFNqyNiRs,357
|
|
7
7
|
flet/auth/authorization_service.py,sha256=6N2LvisSt7KI_VgfyCH0OaJ6jTcmXCkAldN1yYlakzQ,6410
|
|
@@ -20,7 +20,7 @@ flet/components/component.py,sha256=-bkB0A3Q9OpiQ0xuxeK15wajYnJl8hjnsc5_zKTFfHE,
|
|
|
20
20
|
flet/components/component_decorator.py,sha256=14ocjVSXPVl-SduJUtEQ1JivhpIoWnDDG4ioD0TCn0I,639
|
|
21
21
|
flet/components/component_owned.py,sha256=eC2NNNFWmZADBivLHjScfrmEj-s7xygHlABo7CiGtFA,563
|
|
22
22
|
flet/components/memo.py,sha256=tpztAInP4LkGOCFSJLyRuKp2t6EKM2AnX7SQmXiUZH8,620
|
|
23
|
-
flet/components/observable.py,sha256=
|
|
23
|
+
flet/components/observable.py,sha256=1sWoxjaXKQnhxVTXQdxLiiZ6POWsNsX8FL7db2kNTPc,6998
|
|
24
24
|
flet/components/public_utils.py,sha256=9orF-ZoxspZtTmjMUp9KmXL4-jpQG6TAOVSrGTEbVyo,180
|
|
25
25
|
flet/components/utils.py,sha256=6Uzs2cXg2VAWKr82vghSGTL3JglbHzADxkqc_7vns8o,2079
|
|
26
26
|
flet/components/hooks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -41,7 +41,7 @@ flet/controls/border.py,sha256=aBxj8OzEoufGPZb5yibsg2SO2OHeBAFmti63-y_oQtY,8808
|
|
|
41
41
|
flet/controls/border_radius.py,sha256=ePfpA_uNhR6bfBSmYxy2cO0mZ3FU1r63qX_5RuHWwDM,6605
|
|
42
42
|
flet/controls/box.py,sha256=UAz27hMyzXtUGjgm0bTtVupaEkWqUkhAeA1wR1YKoOs,12726
|
|
43
43
|
flet/controls/buttons.py,sha256=0mLPx4fBjQNGn-ejMuNu1wHb38_0BGU0JOggmqbUs1E,9943
|
|
44
|
-
flet/controls/colors.py,sha256=
|
|
44
|
+
flet/controls/colors.py,sha256=6qKCCEPPCk-oYdqj2FtjufMADepQXPGuriZv04imaX8,16594
|
|
45
45
|
flet/controls/context.py,sha256=5daq2ixcHNcs2pyYbH9KCe-tHCq2_ebPjvORMs1TtD4,4250
|
|
46
46
|
flet/controls/control.py,sha256=12Y_b8g8iSY8FlafeYZpaeJSgZQaKNzBLUof5JW4YlU,4488
|
|
47
47
|
flet/controls/control_event.py,sha256=lM3H2V388JUQj9uCbPuUD7t2GxdEwX6F2nBluPzvzBc,3182
|
|
@@ -60,7 +60,7 @@ flet/controls/keys.py,sha256=YpcAeINKelX3WgSOMF8_T7wMzcFmAXNg-ssPej_NZWY,614
|
|
|
60
60
|
flet/controls/layout_control.py,sha256=wF4W4u3MAHLjpin5nH4iOAyoq29v3QrqI6swYnl67js,7301
|
|
61
61
|
flet/controls/margin.py,sha256=ni5FwkchO1LPKPTKV0Cimvh2YzABi-t5DhOqTS25eIQ,2305
|
|
62
62
|
flet/controls/multi_view.py,sha256=7RbM1nt8t75qgTKyfemsV06XQ04Mer0Op409Nu9q9Vs,304
|
|
63
|
-
flet/controls/object_patch.py,sha256=
|
|
63
|
+
flet/controls/object_patch.py,sha256=86jMaZ61u0BDSCkMD93hBwZfVrhpvECFfpIGuZgmVyI,44162
|
|
64
64
|
flet/controls/padding.py,sha256=AdxAZ5dbg1-Bo8aKeJ7AptUdyjaX7VWBIJto5mBT9Pk,2485
|
|
65
65
|
flet/controls/page.py,sha256=Hkxq5mv8UEhtWra9EOA7buytW7Bae3NrlHo-UwTpqj8,30361
|
|
66
66
|
flet/controls/painting.py,sha256=GCEycacejiCAdA4eZBQlTgxmE2ccXyad4Gy7VsjIwn0,12108
|
|
@@ -69,7 +69,7 @@ flet/controls/ref.py,sha256=Lde_Nlly6NEtJX_LYv_DxIDkao6w4Buo7Nus4XUPQDA,580
|
|
|
69
69
|
flet/controls/scrollable_control.py,sha256=Mu0oGA3fxweurlJQq1TuaUw2NMA8xy3DC27zJndQBZc,4571
|
|
70
70
|
flet/controls/template_route.py,sha256=qP5KvFY5gazw-G9Q9bcoADlWAh-MJ_9wsIyIxjElkaE,662
|
|
71
71
|
flet/controls/text_style.py,sha256=WC8uPdfps5PyZ64cdPBnWhC2HULK39Uah5V368JdVoI,9386
|
|
72
|
-
flet/controls/theme.py,sha256=
|
|
72
|
+
flet/controls/theme.py,sha256=CPyVUHMOoIJd015TjtrBUbmFMH9rWWhk61RWB4v9B3k,97937
|
|
73
73
|
flet/controls/transform.py,sha256=gZQGM5nhfiapvm25uxvswbTWu0qQM3oBGRVxSTDhGYY,2782
|
|
74
74
|
flet/controls/types.py,sha256=t9yWNzzJMI-o9Ji4Ia59OdFonNiKwQoj2WGP7qhjHbI,26194
|
|
75
75
|
flet/controls/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -86,7 +86,7 @@ flet/controls/core/icon.py,sha256=LVjdByVXnVjR_vxb_kJT2BMqiF7vgvp0OR-iV9LTw30,41
|
|
|
86
86
|
flet/controls/core/image.py,sha256=Qbooag88pvfqUq-hzf6C-Q1awib_bT3_cOeEAGhyjDA,5455
|
|
87
87
|
flet/controls/core/interactive_viewer.py,sha256=t76mVE29Us9wNCccZBM-RyMrHsmubumnvLf5HYxwxGk,4580
|
|
88
88
|
flet/controls/core/keyboard_listener.py,sha256=Rml7c7pHNzTyBiSbW15cUXwhr5YddTrSo98z2tzWhaI,2527
|
|
89
|
-
flet/controls/core/list_view.py,sha256=
|
|
89
|
+
flet/controls/core/list_view.py,sha256=hlQNqVRd4_BzZpRxlOK00Gk1rFWpvcqneqtZz-7RC3o,3741
|
|
90
90
|
flet/controls/core/markdown.py,sha256=m6CE398R7uNpvNzxtRH3lS13It5-SBg79WvMToNidLo,11075
|
|
91
91
|
flet/controls/core/merge_semantics.py,sha256=o2olHjIDU-QNKAc8JHdQABiZUKeR4dWJApOCEcBaFF4,627
|
|
92
92
|
flet/controls/core/pagelet.py,sha256=VCcPOtlqfL-A0vnDKsUkVdKZkveFVvk5sK_8oWsESpU,4163
|
|
@@ -217,7 +217,7 @@ flet/controls/services/url_launcher.py,sha256=YfvNGaivvwJ2vrSkxwgQ2R1l3A5wbgY6Ax
|
|
|
217
217
|
flet/fastapi/__init__.py,sha256=crLmmKE-B-O-cm5MTlXFreYCUnqkw6mK4eIPUUMvSCM,45
|
|
218
218
|
flet/messaging/connection.py,sha256=yd7NlEAwAMxhCEhh6mLN-cihYfeJdUlHhx5SycRVct4,1646
|
|
219
219
|
flet/messaging/flet_socket_server.py,sha256=bFeC-hlKFhBoVHBYy6o_LzWiuFaUmT-vMT81t5lGEUM,9146
|
|
220
|
-
flet/messaging/protocol.py,sha256=
|
|
220
|
+
flet/messaging/protocol.py,sha256=JauR9qz-FmFeCypafKE-hpSMEcfMFQ9Di-_82EWMwLc,3950
|
|
221
221
|
flet/messaging/pyodide_connection.py,sha256=-bNGKh0nYNtgdJ_nhBGJTF1TNX3vHqgxygetv2ZQwUs,4313
|
|
222
222
|
flet/messaging/session.py,sha256=RQkYkZDIKW-l9ShUvbYKPD6ZXgfD4yVz2WERgUnp_OA,12310
|
|
223
223
|
flet/messaging/session_store.py,sha256=80yy3fjEGJs_60UxS_o2tXl2QCenFb9IVDaJCK8wckY,557
|
|
@@ -229,10 +229,11 @@ flet/testing/__init__.py,sha256=Yb9e6h11b2hV7O3TuqsJ7zwFAgNcbB7tY7Gp2ssxtN4,176
|
|
|
229
229
|
flet/testing/finder.py,sha256=Rqv4qwjMcVx4ZYAJgZgGT2GVH5OR4ZgoQeKj5ZsFsRc,346
|
|
230
230
|
flet/testing/flet_test_app.py,sha256=adDF_CPo9nWXyGxllYVDRt4skq7yfNQoqI2RpFZUTcQ,16580
|
|
231
231
|
flet/testing/tester.py,sha256=_DSRFQQoGISve5JR2nq3AdSbUf18E6FfG3ytRD5tAfo,4946
|
|
232
|
-
flet/utils/__init__.py,sha256=
|
|
232
|
+
flet/utils/__init__.py,sha256=fWHBR8S4g9mX1q9cFA8khZLGKDb9kIbiyH5_ny87lg8,1823
|
|
233
233
|
flet/utils/browser.py,sha256=Z2PomJjClBXRRiPvGP7WRzbguvXQ8W2HQAzd_A5cmvE,157
|
|
234
234
|
flet/utils/classproperty.py,sha256=9utA2znjTkQO9tQ7T8EuaXmBVQeQ1NAhteAc0PZdHHc,271
|
|
235
235
|
flet/utils/deprecated.py,sha256=MzGbWwPlO6EZJNqkFFWd6ZHb3dIQd02WAKEru0yyFEI,3259
|
|
236
|
+
flet/utils/deprecated_enum.py,sha256=G_nJMdBkkPcCKjAWZUK3IWA8p0cNG6VtdYtI---04CU,1244
|
|
236
237
|
flet/utils/files.py,sha256=TQ1FlFQEIzKAj2OmCLbDm_jW4QUlU25t78EihbrJbe4,1841
|
|
237
238
|
flet/utils/from_dict.py,sha256=16jD0SQd_2mO7LK-2zT5MFDSsQYke2Gt7e_Fz_l6Nxw,3559
|
|
238
239
|
flet/utils/hashing.py,sha256=bxUIJ-uS8Aap8l350V9hDwAxaAWuFbjOgnXfMXp7NaY,419
|
|
@@ -246,8 +247,8 @@ flet/utils/platform_utils.py,sha256=U4cqV3EPi5QNYjbhfZmtk41-KMtI_P7KvVdnZzMOgJA,
|
|
|
246
247
|
flet/utils/slugify.py,sha256=e-lsoDc2_dk5jQnySaHCU83AA4O6mguEgCEdk2smW2Y,466
|
|
247
248
|
flet/utils/strings.py,sha256=R63_i7PdSAStCDPJ-O_WHBt3H02JQ14GSbnjLIpPTUc,178
|
|
248
249
|
flet/utils/vector.py,sha256=pYZzjldBWCZbSeSkZ8VmujwcZC7VBWk1NLBPA-2th3U,3207
|
|
249
|
-
flet-0.70.0.
|
|
250
|
-
flet-0.70.0.
|
|
251
|
-
flet-0.70.0.
|
|
252
|
-
flet-0.70.0.
|
|
253
|
-
flet-0.70.0.
|
|
250
|
+
flet-0.70.0.dev6475.dist-info/METADATA,sha256=8yQj97vnuVmquVFkiGj7oZBDB7mbh9mCav8L_qeonx8,6109
|
|
251
|
+
flet-0.70.0.dev6475.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
252
|
+
flet-0.70.0.dev6475.dist-info/entry_points.txt,sha256=mbBhHNUnLHiDqR36WeJrfLJU0Y0y087-M4wagQmaQ_Y,39
|
|
253
|
+
flet-0.70.0.dev6475.dist-info/top_level.txt,sha256=HbLrSnWJX2jZOEZAI14cGzW8Q5BbOGTtE-7knD5FDh0,5
|
|
254
|
+
flet-0.70.0.dev6475.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|