param 2.4.2rc2__tar.gz → 2.5.0b0__tar.gz
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.
- {param-2.4.2rc2 → param-2.5.0b0}/PKG-INFO +3 -3
- {param-2.4.2rc2 → param-2.5.0b0}/param/__init__.py +6 -2
- {param-2.4.2rc2 → param-2.5.0b0}/param/_version.py +2 -2
- {param-2.4.2rc2 → param-2.5.0b0}/param/depends.py +8 -2
- {param-2.4.2rc2 → param-2.5.0b0}/param/ipython.py +16 -7
- {param-2.4.2rc2 → param-2.5.0b0}/param/parameterized.py +411 -98
- {param-2.4.2rc2 → param-2.5.0b0}/param/parameters.py +10 -1
- {param-2.4.2rc2 → param-2.5.0b0}/param/reactive.py +1744 -75
- {param-2.4.2rc2 → param-2.5.0b0}/pyproject.toml +2 -2
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testdynamicparams.py +44 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testipythonmagic.py +92 -0
- param-2.5.0b0/tests/testreactive.py +5779 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testrefs.py +26 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testwatch.py +641 -1
- param-2.4.2rc2/tests/testreactive.py +0 -1513
- {param-2.4.2rc2 → param-2.5.0b0}/.gitignore +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/LICENSE.txt +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/README.md +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/numbergen/__init__.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/param/_utils.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/param/display.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/param/mypy_plugin.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/param/py.typed +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/param/serializer.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/param/version.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/__init__.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/assert_types.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/conftest.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/pyrightconfig-bare.json +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testaddparameter.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testbind.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testbooleanparam.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testbytesparam.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testcalendardateparam.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testcalendardaterangeparam.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testcallable.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testclassselector.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testcolorparameter.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testcomparator.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testcompositeparams.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testcustomparam.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testdateparam.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testdaterangeparam.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testdefaultfactory.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testdefaults.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testdeprecations.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testfiledeserialization.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testfileselector.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testimports.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testjsonserialization.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testlist.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testlistselector.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testmultifileselector.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testnumbergen.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testnumberparameter.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testnumpy.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testobjectselector.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testpandas.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testparamdepends.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testparameter.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testparameterizedobject.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testparameterizedrepr.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testparamoutput.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testparamunion.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testpathparam.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testpickle.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testrangeparameter.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testreprhtml.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testselector.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testsignatures.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/teststringparam.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testtimedependent.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testtupleparam.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testutils.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/testversion.py +0 -0
- {param-2.4.2rc2 → param-2.5.0b0}/tests/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: param
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.5.0b0
|
|
4
4
|
Summary: Declarative parameters for robust Python classes and a rich API for reactive programming
|
|
5
5
|
Project-URL: Homepage, https://param.holoviz.org/
|
|
6
6
|
Project-URL: Tracker, https://github.com/holoviz/param/issues
|
|
@@ -18,15 +18,15 @@ Classifier: License :: OSI Approved :: BSD License
|
|
|
18
18
|
Classifier: Natural Language :: English
|
|
19
19
|
Classifier: Operating System :: OS Independent
|
|
20
20
|
Classifier: Programming Language :: Python :: 3
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.11
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.12
|
|
24
23
|
Classifier: Programming Language :: Python :: 3.13
|
|
25
24
|
Classifier: Programming Language :: Python :: 3.14
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
26
26
|
Classifier: Topic :: Scientific/Engineering
|
|
27
27
|
Classifier: Topic :: Software Development :: Libraries
|
|
28
28
|
Classifier: Typing :: Typed
|
|
29
|
-
Requires-Python: >=3.
|
|
29
|
+
Requires-Python: >=3.11
|
|
30
30
|
Provides-Extra: all
|
|
31
31
|
Requires-Dist: aiohttp; extra == 'all'
|
|
32
32
|
Requires-Dist: cloudpickle; extra == 'all'
|
|
@@ -49,7 +49,7 @@ from .parameterized import (
|
|
|
49
49
|
ParamOverrides, Undefined, get_logger, ParameterizedABC,
|
|
50
50
|
)
|
|
51
51
|
from .parameterized import (output, script_repr,
|
|
52
|
-
discard_events, edit_constant)
|
|
52
|
+
discard_events, edit_constant, batch)
|
|
53
53
|
from .parameterized import shared_parameters
|
|
54
54
|
from .parameterized import logging_level
|
|
55
55
|
from .parameterized import DEBUG, VERBOSE, INFO, WARNING, ERROR, CRITICAL
|
|
@@ -99,7 +99,7 @@ from .parameters import (
|
|
|
99
99
|
CalendarDateRange,
|
|
100
100
|
Event,
|
|
101
101
|
)
|
|
102
|
-
from .reactive import bind, rx
|
|
102
|
+
from .reactive import ReactiveError, bind, collect, current_node, rx
|
|
103
103
|
from ._utils import (
|
|
104
104
|
descendents,
|
|
105
105
|
concrete_descendents,
|
|
@@ -171,6 +171,7 @@ __all__ = (
|
|
|
171
171
|
'Dict',
|
|
172
172
|
'Dynamic',
|
|
173
173
|
'ERROR',
|
|
174
|
+
'ReactiveError',
|
|
174
175
|
'Event',
|
|
175
176
|
'FileSelector',
|
|
176
177
|
'Filename',
|
|
@@ -207,8 +208,11 @@ __all__ = (
|
|
|
207
208
|
'XYCoordinates',
|
|
208
209
|
'__version__',
|
|
209
210
|
'_is_number',
|
|
211
|
+
'batch',
|
|
210
212
|
'bind',
|
|
213
|
+
'collect',
|
|
211
214
|
'concrete_descendents',
|
|
215
|
+
'current_node',
|
|
212
216
|
'depends',
|
|
213
217
|
'descendents',
|
|
214
218
|
'discard_events',
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '2.
|
|
22
|
-
__version_tuple__ = version_tuple = (2,
|
|
21
|
+
__version__ = version = '2.5.0b0'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 5, 0, 'b0')
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -7,7 +7,7 @@ from collections import defaultdict
|
|
|
7
7
|
from functools import wraps
|
|
8
8
|
|
|
9
9
|
from .parameterized import (
|
|
10
|
-
Event, Parameter, Parameterized, ParameterizedMetaclass, transform_reference,
|
|
10
|
+
Event, Parameter, Parameterized, ParameterizedMetaclass, Watcher, transform_reference,
|
|
11
11
|
)
|
|
12
12
|
from ._utils import iscoroutinefunction
|
|
13
13
|
|
|
@@ -31,10 +31,12 @@ class DependencyInfo(t.TypedDict):
|
|
|
31
31
|
|
|
32
32
|
class _DepsFn(t.Protocol[_FullP, _R]):
|
|
33
33
|
_dinfo: DependencyInfo
|
|
34
|
+
_watchers: list[Watcher]
|
|
34
35
|
def __call__(self, *args: _FullP.args, **kwargs: _FullP.kwargs) -> _R: ...
|
|
35
36
|
|
|
36
37
|
class DependsFunc(t.Protocol[_P, _R]):
|
|
37
38
|
_dinfo: DependencyInfo
|
|
39
|
+
_watchers: list[Watcher]
|
|
38
40
|
def __call__(self, *args: _P.args, **kwargs: _P.kwargs) -> _R: ...
|
|
39
41
|
|
|
40
42
|
|
|
@@ -162,6 +164,8 @@ def _depends_impl(
|
|
|
162
164
|
|
|
163
165
|
typed_depends = t.cast("_DepsFn[_FullP, _R]", _depends)
|
|
164
166
|
typed_depends._dinfo = _dinfo
|
|
167
|
+
# Preserve watchers from a decorator this one stacks on top of.
|
|
168
|
+
typed_depends._watchers = list(getattr(func, '_watchers', ()))
|
|
165
169
|
|
|
166
170
|
if string_specs or not watch:
|
|
167
171
|
# string_specs case handled elsewhere (later), in Parameterized.__init__
|
|
@@ -233,6 +237,8 @@ def _depends_impl(
|
|
|
233
237
|
for group in grouped.values():
|
|
234
238
|
if group[0].owner is None:
|
|
235
239
|
continue
|
|
236
|
-
|
|
240
|
+
typed_depends._watchers.append(
|
|
241
|
+
group[0].owner.param.watch(cb, [dep.name for dep in group])
|
|
242
|
+
)
|
|
237
243
|
|
|
238
244
|
return typed_depends
|
|
@@ -379,17 +379,22 @@ class IPythonDisplay:
|
|
|
379
379
|
from IPython.display import display
|
|
380
380
|
|
|
381
381
|
from param.depends import depends
|
|
382
|
-
from param.parameterized import Undefined, resolve_ref
|
|
382
|
+
from param.parameterized import Skip, Undefined, resolve_ref
|
|
383
383
|
from param.reactive import rx
|
|
384
384
|
|
|
385
385
|
handle = None
|
|
386
386
|
cb: t.Callable[..., t.Any]
|
|
387
387
|
if isinstance(self._reactive, rx):
|
|
388
388
|
cb_rx_cb = self._reactive._callback
|
|
389
|
-
@depends(*
|
|
389
|
+
@depends(*resolve_ref(cb_rx_cb), watch=True)
|
|
390
390
|
def update_handle(*args, **kwargs):
|
|
391
|
-
if handle is
|
|
392
|
-
|
|
391
|
+
if handle is None:
|
|
392
|
+
return
|
|
393
|
+
try:
|
|
394
|
+
value = cb_rx_cb()
|
|
395
|
+
except Skip:
|
|
396
|
+
return
|
|
397
|
+
handle.update(value)
|
|
393
398
|
cb = cb_rx_cb
|
|
394
399
|
else:
|
|
395
400
|
cb_reactive_cb = self._reactive
|
|
@@ -400,11 +405,15 @@ class IPythonDisplay:
|
|
|
400
405
|
cb = cb_reactive_cb
|
|
401
406
|
try:
|
|
402
407
|
obj = cb()
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
handle = display(obj, display_id=uuid.uuid4().hex)
|
|
408
|
+
except Skip:
|
|
409
|
+
obj = None
|
|
406
410
|
except TypeError:
|
|
411
|
+
# Fall back to the plain repr for partially bound functions
|
|
407
412
|
raise NotImplementedError
|
|
413
|
+
else:
|
|
414
|
+
if obj is Undefined:
|
|
415
|
+
obj = None
|
|
416
|
+
handle = display(obj, display_id=uuid.uuid4().hex)
|
|
408
417
|
|
|
409
418
|
def ipython_async_executor(func):
|
|
410
419
|
event_loop = None
|