reflex 0.4.9a1__py3-none-any.whl → 0.4.9.post1__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 reflex might be problematic. Click here for more details.
- reflex/app.py +3 -0
- reflex/constants/installer.py +1 -0
- reflex/state.py +27 -6
- reflex/utils/prerequisites.py +1 -1
- reflex/utils/pyi_generator.py +6 -1
- {reflex-0.4.9a1.dist-info → reflex-0.4.9.post1.dist-info}/METADATA +5 -3
- {reflex-0.4.9a1.dist-info → reflex-0.4.9.post1.dist-info}/RECORD +10 -10
- {reflex-0.4.9a1.dist-info → reflex-0.4.9.post1.dist-info}/WHEEL +1 -1
- {reflex-0.4.9a1.dist-info → reflex-0.4.9.post1.dist-info}/LICENSE +0 -0
- {reflex-0.4.9a1.dist-info → reflex-0.4.9.post1.dist-info}/entry_points.txt +0 -0
reflex/app.py
CHANGED
|
@@ -839,6 +839,9 @@ class App(Base):
|
|
|
839
839
|
compile_results.append(
|
|
840
840
|
compiler.compile_contexts(self.state, self.theme),
|
|
841
841
|
)
|
|
842
|
+
# Fix #2992 by removing the top-level appearance prop
|
|
843
|
+
if self.theme is not None:
|
|
844
|
+
self.theme.appearance = None
|
|
842
845
|
|
|
843
846
|
app_root = self._app_root(app_wrappers=app_wrappers)
|
|
844
847
|
|
reflex/constants/installer.py
CHANGED
reflex/state.py
CHANGED
|
@@ -1154,6 +1154,29 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
|
|
|
1154
1154
|
for substate in self.substates.values():
|
|
1155
1155
|
substate.reset()
|
|
1156
1156
|
|
|
1157
|
+
@classmethod
|
|
1158
|
+
@functools.lru_cache
|
|
1159
|
+
def _is_client_storage(cls, prop_name_or_field: str | ModelField) -> bool:
|
|
1160
|
+
"""Check if the var is a client storage var.
|
|
1161
|
+
|
|
1162
|
+
Args:
|
|
1163
|
+
prop_name_or_field: The name of the var or the field itself.
|
|
1164
|
+
|
|
1165
|
+
Returns:
|
|
1166
|
+
Whether the var is a client storage var.
|
|
1167
|
+
"""
|
|
1168
|
+
if isinstance(prop_name_or_field, str):
|
|
1169
|
+
field = cls.get_fields().get(prop_name_or_field)
|
|
1170
|
+
else:
|
|
1171
|
+
field = prop_name_or_field
|
|
1172
|
+
return field is not None and (
|
|
1173
|
+
isinstance(field.default, ClientStorageBase)
|
|
1174
|
+
or (
|
|
1175
|
+
isinstance(field.type_, type)
|
|
1176
|
+
and issubclass(field.type_, ClientStorageBase)
|
|
1177
|
+
)
|
|
1178
|
+
)
|
|
1179
|
+
|
|
1157
1180
|
def _reset_client_storage(self):
|
|
1158
1181
|
"""Reset client storage base vars to their default values."""
|
|
1159
1182
|
# Client-side storage is reset during hydrate so that clearing cookies
|
|
@@ -1161,10 +1184,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
|
|
|
1161
1184
|
fields = self.get_fields()
|
|
1162
1185
|
for prop_name in self.base_vars:
|
|
1163
1186
|
field = fields[prop_name]
|
|
1164
|
-
if
|
|
1165
|
-
isinstance(field.type_, type)
|
|
1166
|
-
and issubclass(field.type_, ClientStorageBase)
|
|
1167
|
-
):
|
|
1187
|
+
if self._is_client_storage(field):
|
|
1168
1188
|
setattr(self, prop_name, copy.deepcopy(field.default))
|
|
1169
1189
|
|
|
1170
1190
|
# Recursively reset the substate client storage.
|
|
@@ -1825,8 +1845,9 @@ class UpdateVarsInternalState(State):
|
|
|
1825
1845
|
for var, value in vars.items():
|
|
1826
1846
|
state_name, _, var_name = var.rpartition(".")
|
|
1827
1847
|
var_state_cls = State.get_class_substate(state_name)
|
|
1828
|
-
|
|
1829
|
-
|
|
1848
|
+
if var_state_cls._is_client_storage(var_name):
|
|
1849
|
+
var_state = await self.get_state(var_state_cls)
|
|
1850
|
+
setattr(var_state, var_name, value)
|
|
1830
1851
|
|
|
1831
1852
|
|
|
1832
1853
|
class OnLoadInternalState(State):
|
reflex/utils/prerequisites.py
CHANGED
|
@@ -823,7 +823,7 @@ def install_frontend_packages(packages: set[str], config: Config):
|
|
|
823
823
|
"""
|
|
824
824
|
# unsupported archs(arm and 32bit machines) will use npm anyway. so we dont have to run npm twice
|
|
825
825
|
fallback_command = (
|
|
826
|
-
|
|
826
|
+
get_package_manager()
|
|
827
827
|
if not constants.IS_WINDOWS
|
|
828
828
|
or constants.IS_WINDOWS
|
|
829
829
|
and constants.IS_WINDOWS_BUN_SUPPORTED_MACHINE
|
reflex/utils/pyi_generator.py
CHANGED
|
@@ -34,6 +34,7 @@ PWD = Path(".").resolve()
|
|
|
34
34
|
|
|
35
35
|
EXCLUDED_FILES = [
|
|
36
36
|
"__init__.py",
|
|
37
|
+
"app.py",
|
|
37
38
|
"component.py",
|
|
38
39
|
"bare.py",
|
|
39
40
|
"foreach.py",
|
|
@@ -795,7 +796,11 @@ class PyiGenerator:
|
|
|
795
796
|
file_targets = []
|
|
796
797
|
for target in targets:
|
|
797
798
|
target_path = Path(target)
|
|
798
|
-
if
|
|
799
|
+
if (
|
|
800
|
+
target_path.is_file()
|
|
801
|
+
and target_path.suffix == ".py"
|
|
802
|
+
and target_path.name not in EXCLUDED_FILES
|
|
803
|
+
):
|
|
799
804
|
file_targets.append(target_path)
|
|
800
805
|
continue
|
|
801
806
|
if not target_path.is_dir():
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: reflex
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.9.post1
|
|
4
4
|
Summary: Web apps in pure Python.
|
|
5
|
-
Home-page: https://reflex.dev
|
|
6
5
|
License: Apache-2.0
|
|
7
6
|
Keywords: web,framework
|
|
8
7
|
Author: Nikhil Rao
|
|
@@ -15,6 +14,8 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
19
|
Requires-Dist: alembic (>=1.11.1,<2.0)
|
|
19
20
|
Requires-Dist: build (>=1.0.3,<2.0)
|
|
20
21
|
Requires-Dist: charset-normalizer (>=3.3.2,<4.0)
|
|
@@ -48,6 +49,7 @@ Requires-Dist: wheel (>=0.42.0,<1.0)
|
|
|
48
49
|
Requires-Dist: wrapt (>=1.11.0,<2.0) ; python_version < "3.11"
|
|
49
50
|
Requires-Dist: wrapt (>=1.14.0,<2.0) ; python_version >= "3.11"
|
|
50
51
|
Project-URL: Documentation, https://reflex.dev/docs/getting-started/introduction
|
|
52
|
+
Project-URL: Homepage, https://reflex.dev
|
|
51
53
|
Project-URL: Repository, https://github.com/reflex-dev/reflex
|
|
52
54
|
Description-Content-Type: text/markdown
|
|
53
55
|
|
|
@@ -64,7 +64,7 @@ reflex/__init__.py,sha256=qwTfjJemUEeC1Nt3WY1K7YQfy4wexNg6nXQ1PPWNzzk,5723
|
|
|
64
64
|
reflex/__init__.pyi,sha256=5z4RX4_rMuLjtXgZry7e_fnvmcZG2oKT7CHcmHSv0OA,7649
|
|
65
65
|
reflex/__main__.py,sha256=6cVrGEyT3j3tEvlEVUatpaYfbB5EF3UVY-6vc_Z7-hw,108
|
|
66
66
|
reflex/admin.py,sha256=-bTxFUEoHo4X9FzmcSa6KSVVPpF7wh38lBvF67GhSvQ,373
|
|
67
|
-
reflex/app.py,sha256=
|
|
67
|
+
reflex/app.py,sha256=pvde4hx5MtvutLMAeuurjT91UXa-aRTKpQwv-R1GVgo,45154
|
|
68
68
|
reflex/app.pyi,sha256=y6giMJpuUCQguCyrGQKnWvhDCpuN9ktXoNb7OZl5l2g,5010
|
|
69
69
|
reflex/app_module_for_backend.py,sha256=APD4jFsG-Tfd0vZWAfsdBYj4E4PeGZjjWeOZwBfUKRM,1152
|
|
70
70
|
reflex/base.py,sha256=oVOWMxWOSc96Jon0R4fWrSt0PkMqoPhaM0PJGoK147o,4250
|
|
@@ -453,7 +453,7 @@ reflex/constants/compiler.py,sha256=uWTC28IpBlJzh-BnO05xoiCwYQsGeXJJ3RG6UB1xZQo,
|
|
|
453
453
|
reflex/constants/config.py,sha256=7uUypVy-ezLt3UN3jXEX1XvL3sKaCLBwnJCyYjg9erI,1331
|
|
454
454
|
reflex/constants/custom_components.py,sha256=SX0SQVb-d6HJkZdezFL4UgkumyF6eJF682y4OvRUqUM,1268
|
|
455
455
|
reflex/constants/event.py,sha256=7cEUTWdIhWVw7g5Bn9yTZlxNnJY5MeJL55q-vT1YOZ0,2668
|
|
456
|
-
reflex/constants/installer.py,sha256=
|
|
456
|
+
reflex/constants/installer.py,sha256=4ztmgMYNUYDEEwPHu_GNTlcMoAEuJ1C4waFuhwA83rY,3261
|
|
457
457
|
reflex/constants/route.py,sha256=9ydQEdlz3YwGmGMHVGz7zA-INoOLtz_xUU2S-WmhZZM,1940
|
|
458
458
|
reflex/constants/style.py,sha256=gSzu0sQEQjW81PekxJnwRs7SXQQVco-LxtVjCi0IQZc,636
|
|
459
459
|
reflex/custom_components/__init__.py,sha256=R4zsvOi4dfPmHc18KEphohXnQFBPnUCb50cMR5hSLDE,36
|
|
@@ -470,7 +470,7 @@ reflex/model.py,sha256=oenX-2waasLr637nUUeIBMPbV10Hhv13GrWUTyiytxk,13116
|
|
|
470
470
|
reflex/page.py,sha256=4FYtFn52sMb0ZhR5xHWd559HmRcpsMAHx9jjKchiyGE,1921
|
|
471
471
|
reflex/reflex.py,sha256=etDzJ7PzS5E7IGVdBiiPgFiG9z0xZkYwTWUJi9e8CU8,17828
|
|
472
472
|
reflex/route.py,sha256=mRv4rHuSI6x-uWALujPfM5PNtoRea6cuThjchHtA2hQ,2908
|
|
473
|
-
reflex/state.py,sha256=
|
|
473
|
+
reflex/state.py,sha256=4dkHqnhXQMgyMCmQQm0LCv8sw4SokVBbg3PQ4jwJoa4,106321
|
|
474
474
|
reflex/style.py,sha256=3gM5xJpn1yd5UnRDRKrJWgCd871Rj_ZnxhQyWCspx2Q,8834
|
|
475
475
|
reflex/testing.py,sha256=WOTjpnOo0U8tJHl5ie7mWOD3Cucf7HyP2x9FGMkYc4c,30556
|
|
476
476
|
reflex/utils/__init__.py,sha256=y-AHKiRQAhk2oAkvn7W8cRVTZVK625ff8tTwvZtO7S4,24
|
|
@@ -483,17 +483,17 @@ reflex/utils/export.py,sha256=UJd4BYFW9_eexhLCP4C5Ri8Cq2tWAPNVspq70lPLCyo,2270
|
|
|
483
483
|
reflex/utils/format.py,sha256=4vY7NP-f7B2euJ5F5dM3yh5SYPzCY3bVZDATG2DMaMU,22648
|
|
484
484
|
reflex/utils/imports.py,sha256=IRnSLA_LI0ougGpOT_smwVPDpfoPcC7t_tY4mnuhj6k,2277
|
|
485
485
|
reflex/utils/path_ops.py,sha256=Vy6fU_bXvOcCvbXdTSmeLwy_C4h9seYU-3yIrVdZEZQ,4737
|
|
486
|
-
reflex/utils/prerequisites.py,sha256=
|
|
486
|
+
reflex/utils/prerequisites.py,sha256=d1ec--4bVTie1zNtpl5W3cb8vxPA3oLwncd2Iotg-YY,47234
|
|
487
487
|
reflex/utils/processes.py,sha256=9XIffdPsxe-RnaMB9Q_VyaXVJrXAx9OIjrExNYBl8x0,10730
|
|
488
|
-
reflex/utils/pyi_generator.py,sha256=
|
|
488
|
+
reflex/utils/pyi_generator.py,sha256=1X3nvR5qo7QnXmX4SJ8Jo3KL_ctS8oDVaLoWSh-9L4U,27795
|
|
489
489
|
reflex/utils/serializers.py,sha256=AK3q6UqGwha21lz04c1rwlqlgbDkUMVpUG4Yf1sLmcs,9023
|
|
490
490
|
reflex/utils/telemetry.py,sha256=NYAzPe7nU0EUwq2hIAByOzlie_5RhFlfHganBqG5OfA,4013
|
|
491
491
|
reflex/utils/types.py,sha256=QtsWi7ACjwHLfc7Wy72YU85bGUS3J-P_XlltYUAfnPk,13679
|
|
492
492
|
reflex/utils/watch.py,sha256=HzGrHQIZ_62Di0BO46kd2AZktNA3A6nFIBuf8c6ip30,2609
|
|
493
493
|
reflex/vars.py,sha256=45Ejn54a3BC1bXp5nzFDUjirgGRrHD-YX3rKiKVRL-g,67157
|
|
494
494
|
reflex/vars.pyi,sha256=7sVCLoLg9Y7QAmXWz6FCtVmScpSV84u0yQ3ZBImb_Bk,5583
|
|
495
|
-
reflex-0.4.
|
|
496
|
-
reflex-0.4.
|
|
497
|
-
reflex-0.4.
|
|
498
|
-
reflex-0.4.
|
|
499
|
-
reflex-0.4.
|
|
495
|
+
reflex-0.4.9.post1.dist-info/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
|
|
496
|
+
reflex-0.4.9.post1.dist-info/METADATA,sha256=W_hgAg7kDnx8Qu4iahpN9s9R-maITI3gIbiwBmEwoU4,11882
|
|
497
|
+
reflex-0.4.9.post1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
498
|
+
reflex-0.4.9.post1.dist-info/entry_points.txt,sha256=H1Z5Yat_xJfy0dRT1Frk2PkO_p41Xy7fCKlj4FcdL9o,44
|
|
499
|
+
reflex-0.4.9.post1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|