solara-ui 1.57.1__py3-none-any.whl → 1.57.2__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.
- solara/__init__.py +1 -1
- solara/server/static/solara_bootstrap.py +1 -1
- solara/server/utils.py +5 -1
- solara/toestand.py +57 -10
- solara/website/pages/changelog/changelog.md +4 -0
- {solara_ui-1.57.1.dist-info → solara_ui-1.57.2.dist-info}/METADATA +1 -1
- {solara_ui-1.57.1.dist-info → solara_ui-1.57.2.dist-info}/RECORD +11 -11
- {solara_ui-1.57.1.data → solara_ui-1.57.2.data}/data/etc/jupyter/jupyter_notebook_config.d/solara.json +0 -0
- {solara_ui-1.57.1.data → solara_ui-1.57.2.data}/data/etc/jupyter/jupyter_server_config.d/solara.json +0 -0
- {solara_ui-1.57.1.dist-info → solara_ui-1.57.2.dist-info}/WHEEL +0 -0
- {solara_ui-1.57.1.dist-info → solara_ui-1.57.2.dist-info}/licenses/LICENSE +0 -0
solara/__init__.py
CHANGED
|
@@ -119,7 +119,7 @@ async def main():
|
|
|
119
119
|
]
|
|
120
120
|
for dep in requirements:
|
|
121
121
|
await micropip.install(dep, keep_going=True)
|
|
122
|
-
await micropip.install("/wheels/solara-1.57.
|
|
122
|
+
await micropip.install("/wheels/solara-1.57.2-py2.py3-none-any.whl", keep_going=True)
|
|
123
123
|
import solara
|
|
124
124
|
|
|
125
125
|
el = solara.Warning("lala")
|
solara/server/utils.py
CHANGED
|
@@ -27,7 +27,11 @@ def path_is_child_of(path: Path, parent: Path) -> bool:
|
|
|
27
27
|
# on windows, we sometimes get different casing (only seen on CI)
|
|
28
28
|
path_string = path_string.lower()
|
|
29
29
|
parent_string = parent_string.lower()
|
|
30
|
-
|
|
30
|
+
# Ensure we check for a proper path boundary, not just string prefix.
|
|
31
|
+
# Without the separator, "/parent_sibling" would match "/parent"
|
|
32
|
+
if not parent_string.endswith(os.sep):
|
|
33
|
+
parent_string = parent_string + os.sep
|
|
34
|
+
return path_string.startswith(parent_string) or path_string == parent_string.rstrip(os.sep)
|
|
31
35
|
|
|
32
36
|
|
|
33
37
|
@contextlib.contextmanager
|
solara/toestand.py
CHANGED
|
@@ -4,6 +4,7 @@ import logging
|
|
|
4
4
|
import os
|
|
5
5
|
import sys
|
|
6
6
|
import threading
|
|
7
|
+
import weakref
|
|
7
8
|
from types import FrameType
|
|
8
9
|
import warnings
|
|
9
10
|
import copy
|
|
@@ -929,37 +930,83 @@ class AutoSubscribeContextManagerBase:
|
|
|
929
930
|
thread_local.reactive_watch = self.previous_reactive_watch
|
|
930
931
|
self.unsubscribe_previous()
|
|
931
932
|
self.subscribed_previous_run = self.subscribed.copy()
|
|
933
|
+
# Clear saved references to avoid preventing garbage collection.
|
|
934
|
+
# Without this, a Computed's AutoSubscribeContextManager retains
|
|
935
|
+
# previous_reactive_watch (a bound method from the component's
|
|
936
|
+
# AutoSubscribeContextManagerReacton), which transitively keeps
|
|
937
|
+
# the _RenderContext alive through closure cells.
|
|
938
|
+
self.previous_reactive_watch = None
|
|
939
|
+
self.reactive_used_before = None
|
|
932
940
|
|
|
933
941
|
|
|
934
942
|
class Context:
|
|
935
943
|
def __init__(self, render_context, kernel_context):
|
|
936
944
|
# combine the render context *and* the kernel context into one context
|
|
937
|
-
|
|
938
|
-
|
|
945
|
+
# Use weakrefs for both render_context and kernel_context to avoid
|
|
946
|
+
# preventing garbage collection when contexts are closed.
|
|
947
|
+
# Subscriptions (e.g. from Computed/AutoSubscribeContextManager)
|
|
948
|
+
# capture Context objects in listeners dicts. Without weakrefs, these
|
|
949
|
+
# keep the contexts alive even after close(), causing memory leaks.
|
|
950
|
+
if render_context is not None:
|
|
951
|
+
self._render_context_ref: Optional[weakref.ref] = weakref.ref(render_context)
|
|
952
|
+
self._render_context_id: Optional[int] = id(render_context)
|
|
953
|
+
else:
|
|
954
|
+
self._render_context_ref = None
|
|
955
|
+
self._render_context_id = None
|
|
956
|
+
# Use weakref for kernel_context when possible. nullcontext (used when
|
|
957
|
+
# there is no kernel) doesn't support weakrefs, so fall back to strong ref.
|
|
958
|
+
try:
|
|
959
|
+
self._kernel_context_ref: Optional[weakref.ref] = weakref.ref(kernel_context)
|
|
960
|
+
self._kernel_context_id: Optional[int] = id(kernel_context)
|
|
961
|
+
self._kernel_context_strong: Any = None
|
|
962
|
+
except TypeError:
|
|
963
|
+
self._kernel_context_ref = None
|
|
964
|
+
self._kernel_context_id = id(kernel_context) if kernel_context is not None else None
|
|
965
|
+
self._kernel_context_strong = kernel_context
|
|
966
|
+
|
|
967
|
+
@property
|
|
968
|
+
def render_context(self):
|
|
969
|
+
if self._render_context_ref is not None:
|
|
970
|
+
return self._render_context_ref()
|
|
971
|
+
return None
|
|
972
|
+
|
|
973
|
+
@property
|
|
974
|
+
def kernel_context(self):
|
|
975
|
+
if self._kernel_context_ref is not None:
|
|
976
|
+
return self._kernel_context_ref()
|
|
977
|
+
return self._kernel_context_strong
|
|
939
978
|
|
|
940
979
|
def __enter__(self):
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
980
|
+
rc = self.render_context
|
|
981
|
+
if rc is not None:
|
|
982
|
+
rc.__enter__()
|
|
983
|
+
kc = self.kernel_context
|
|
984
|
+
if kc is not None:
|
|
985
|
+
kc.__enter__()
|
|
944
986
|
|
|
945
987
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
946
|
-
|
|
988
|
+
rc = self.render_context
|
|
989
|
+
if rc is not None:
|
|
947
990
|
# this will trigger a render
|
|
948
|
-
res1 =
|
|
991
|
+
res1 = rc.__exit__(exc_type, exc_val, exc_tb)
|
|
949
992
|
else:
|
|
950
993
|
res1 = None
|
|
951
994
|
|
|
952
995
|
# pop the current context from the stack
|
|
953
|
-
|
|
996
|
+
kc = self.kernel_context
|
|
997
|
+
if kc is not None:
|
|
998
|
+
res2 = kc.__exit__(exc_type, exc_val, exc_tb)
|
|
999
|
+
else:
|
|
1000
|
+
res2 = None
|
|
954
1001
|
return res1 or res2
|
|
955
1002
|
|
|
956
1003
|
def __eq__(self, value: object) -> bool:
|
|
957
1004
|
if not isinstance(value, Context):
|
|
958
1005
|
return False
|
|
959
|
-
return self.
|
|
1006
|
+
return self._render_context_id == value._render_context_id and self._kernel_context_id == value._kernel_context_id
|
|
960
1007
|
|
|
961
1008
|
def __hash__(self) -> int:
|
|
962
|
-
return hash(
|
|
1009
|
+
return hash(self._render_context_id) ^ hash(self._kernel_context_id)
|
|
963
1010
|
|
|
964
1011
|
def __repr__(self) -> str:
|
|
965
1012
|
return f"Context(render_context={self.render_context}, kernel_context={self.kernel_context})"
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Solara Changelog
|
|
2
2
|
|
|
3
|
+
## Version 1.57.1
|
|
4
|
+
|
|
5
|
+
* Bug Fix: Support Altair 6+ Vega-Lite MIME types in `FigureAltair`. [724c01c8](https://github.com/widgetti/solara/commit/724c01c8)
|
|
6
|
+
|
|
3
7
|
## Version 1.57.0
|
|
4
8
|
|
|
5
9
|
* Feature: Add `watch` option to `FileBrowser` for automatic file change detection. [a0c75202](https://github.com/widgetti/solara/commit/a0c75202)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
prefix/etc/jupyter/jupyter_notebook_config.d/solara.json,sha256=3UhTBQi6z7F7pPjmqXxfddv79c8VGR9H7zStDLp6AwY,115
|
|
2
2
|
prefix/etc/jupyter/jupyter_server_config.d/solara.json,sha256=D9J-rYxAzyD5GOqWvuPjacGUVFHsYtTfZ4FUbRzRvIA,113
|
|
3
|
-
solara/__init__.py,sha256=
|
|
3
|
+
solara/__init__.py,sha256=OdXEWE5nLX4ijFdj1kf9rqelF14Ss_4bACjA-7bAUOc,3647
|
|
4
4
|
solara/__main__.py,sha256=J_f3D_mgiNicU_ay_I-qn08GOViSXm04Ym0mopqh2Os,24853
|
|
5
5
|
solara/_stores.py,sha256=N2Ec-61XNFXwigBx8f5QYPx7gDXenCOBdmLPXiJB45E,12320
|
|
6
6
|
solara/alias.py,sha256=9vfLzud77NP8in3OID9b5mmIO8NyrnFjN2_aE0lSb1k,216
|
|
@@ -21,7 +21,7 @@ solara/reactive.py,sha256=KN0PJl-ivxjgQj008zyPGnORo5bTNaY77uASsSW0mFQ,3430
|
|
|
21
21
|
solara/routing.py,sha256=G_iZKozdVoUuD-qSMyuPV6jeN4qBqujAUvekw036f88,9143
|
|
22
22
|
solara/settings.py,sha256=VeYkEdWeJePXldFvfdJteiiydWTqsNtpgsYscKm7lrA,2726
|
|
23
23
|
solara/tasks.py,sha256=Wjb-0ExfW2lMbT40sYG3yEzUMLOHKKzHshCahBOELk8,37599
|
|
24
|
-
solara/toestand.py,sha256=
|
|
24
|
+
solara/toestand.py,sha256=VIDriJGHDWSV77wGT-0IV2JpDQkGx9goAR-dlLyLGAQ,36487
|
|
25
25
|
solara/util.py,sha256=UUO3BfhXb3tGP-uj8UuTYMx6kuph6PiDp4XXm-f6uyg,9697
|
|
26
26
|
solara/validate_hooks.py,sha256=JTXOnfSPhNQaZFuMYm5EuvB_TlnZz1kw8hqDMNu_B5M,10345
|
|
27
27
|
solara/components/__init__.py,sha256=j5Tv0tyzs80Bsl5hvTIF_x-RQyAvr3ooqIXnABamW44,3214
|
|
@@ -123,7 +123,7 @@ solara/server/shell.py,sha256=eLrpTAw3j_1pU-2S7_Jzd4xkoSs_CA7Nv7w0Q7IVLUM,9333
|
|
|
123
123
|
solara/server/starlette.py,sha256=gEBSJf-jZQ6Ep3HKIkcZNadpxgCp6VWdvlq67TjxJQ8,32934
|
|
124
124
|
solara/server/telemetry.py,sha256=GPKGA5kCIqJb76wgxQ2_U2uV_s0r-1tKqv-GVxo5hs8,6038
|
|
125
125
|
solara/server/threaded.py,sha256=k9k461md4MxEFX-RLit5RpVRPFlQNwr-qp5pprT8JB0,2347
|
|
126
|
-
solara/server/utils.py,sha256=
|
|
126
|
+
solara/server/utils.py,sha256=gqWtHNFxnEif2L8Fb5P18v-jgd5iQujXloBPZuBURv0,1487
|
|
127
127
|
solara/server/websocket.py,sha256=hUYw9TeVf4vHKL8TGG4RAZGLL7rmkt1INVq5qSYRWOo,1076
|
|
128
128
|
solara/server/assets/custom.css,sha256=4p04-uxHTobfr6Xkvf1iOrYiks8NciWLT_EwHZSy6jw,15
|
|
129
129
|
solara/server/assets/custom.js,sha256=YT-UUYzA5uI5-enmbIsrRhofY_IJAO-HanaMwiNUEos,16
|
|
@@ -146,7 +146,7 @@ solara/server/static/highlight-dark.css,sha256=xO8-vta9vG4s1OfJNHXWqiLWzx_gM03jo
|
|
|
146
146
|
solara/server/static/highlight.css,sha256=k8ZdT5iwrGQ5tXTQHAXuxvZrSUq3kwCdEpy3mlFoZjs,2637
|
|
147
147
|
solara/server/static/main-vuetify.js,sha256=R3qM4xMlstMpRUdRaul78p34z_Av2ONSTXksg2V9TqQ,9503
|
|
148
148
|
solara/server/static/main.js,sha256=mcx4JNQ4Lg4pNdUIqMoZos1mZyYFS48yd_JNFFJUqIE,5679
|
|
149
|
-
solara/server/static/solara_bootstrap.py,sha256=
|
|
149
|
+
solara/server/static/solara_bootstrap.py,sha256=eprfnRMTMqZ1SMN_t8c7jnjCbwFtAdqKvILa5Fluoe8,3195
|
|
150
150
|
solara/server/static/sun.svg,sha256=jEKBAGCr7b9zNYv0VUb7lMWKjnU2dX69_Ye_DZWGXJI,6855
|
|
151
151
|
solara/server/static/webworker.js,sha256=cjAFz7-SygStHJnYlJUlJs-gE_7YQeQ-WBDcmKYyjvo,1372
|
|
152
152
|
solara/server/templates/index.html.j2,sha256=JXQo1M-STFHLBOFetgG7509cAq8xUP0VAEtYDzz35fY,31
|
|
@@ -222,7 +222,7 @@ solara/website/pages/apps/multipage/page1.py,sha256=5hK0RZ8UBBOaZcPKaplbLeb0Vvae
|
|
|
222
222
|
solara/website/pages/apps/multipage/page2.py,sha256=uRJ8YPFyKy7GR_Ii8DJSx3akb3H15rQAJZETMt9jVEk,1422
|
|
223
223
|
solara/website/pages/careers/__init__.py,sha256=_aaO9YQOvy8JE9PYkWeSNzLU4pUU-PJMAaYy07YbKsU,1479
|
|
224
224
|
solara/website/pages/changelog/__init__.py,sha256=0ouQpbt5EGEY6bHmSMt6S7Gk71gAmuaIuevT5wEE2zQ,277
|
|
225
|
-
solara/website/pages/changelog/changelog.md,sha256=
|
|
225
|
+
solara/website/pages/changelog/changelog.md,sha256=Ybqe4Geu19HFkYl9uiXTpZpEy2FUyrhmeepnLs77CVw,33680
|
|
226
226
|
solara/website/pages/contact/__init__.py,sha256=NkjxJo258RTHLFPQ18IVZ9euS_vJciHUrM4o1fz9QJE,1259
|
|
227
227
|
solara/website/pages/documentation/__init__.py,sha256=lv9cleVukKDLKRtjTYIlfBDi8Aw3bEz2iV8-IxBz3LA,5563
|
|
228
228
|
solara/website/pages/documentation/advanced/__init__.py,sha256=bLLvasuqVVWJxGN89m77ChZhDivEhVavw9-_CiG3IZA,414
|
|
@@ -456,9 +456,9 @@ solara/widgets/vue/gridlayout.vue,sha256=LZk-YlqM7nv_7Y5TTq2xqfH1j2SLP1QOH5eiz7G
|
|
|
456
456
|
solara/widgets/vue/html.vue,sha256=48K5rjp0AdJDeRV6F3nOHW3J0WXPeHn55r5pGClK2fU,112
|
|
457
457
|
solara/widgets/vue/navigator.vue,sha256=3hhh2_sXpnsdM1vrs2nQ0bZHLCB10HhtQeYLS-tO85s,4790
|
|
458
458
|
solara/widgets/vue/vegalite.vue,sha256=zhocRsUCNIRQCEbD16er5sYnuHU0YThatRHnorA3P18,4596
|
|
459
|
-
solara_ui-1.57.
|
|
460
|
-
solara_ui-1.57.
|
|
461
|
-
solara_ui-1.57.
|
|
462
|
-
solara_ui-1.57.
|
|
463
|
-
solara_ui-1.57.
|
|
464
|
-
solara_ui-1.57.
|
|
459
|
+
solara_ui-1.57.2.data/data/etc/jupyter/jupyter_notebook_config.d/solara.json,sha256=3UhTBQi6z7F7pPjmqXxfddv79c8VGR9H7zStDLp6AwY,115
|
|
460
|
+
solara_ui-1.57.2.data/data/etc/jupyter/jupyter_server_config.d/solara.json,sha256=D9J-rYxAzyD5GOqWvuPjacGUVFHsYtTfZ4FUbRzRvIA,113
|
|
461
|
+
solara_ui-1.57.2.dist-info/METADATA,sha256=fQWMrGm3hdkgq3RfClze3q48YR_7SmCbd6f4OwC0enw,7304
|
|
462
|
+
solara_ui-1.57.2.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
463
|
+
solara_ui-1.57.2.dist-info/licenses/LICENSE,sha256=fFJUz-CWzZ9nEc4QZKu44jMEoDr5fEW-SiqljKpD82E,1086
|
|
464
|
+
solara_ui-1.57.2.dist-info/RECORD,,
|
|
File without changes
|
{solara_ui-1.57.1.data → solara_ui-1.57.2.data}/data/etc/jupyter/jupyter_server_config.d/solara.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|