param 2.4.0a0__tar.gz → 2.4.0a1__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.0a0 → param-2.4.0a1}/PKG-INFO +1 -1
- {param-2.4.0a0 → param-2.4.0a1}/param/_version.py +2 -2
- {param-2.4.0a0 → param-2.4.0a1}/param/parameterized.py +1 -9
- {param-2.4.0a0 → param-2.4.0a1}/tests/testparameterizedobject.py +21 -0
- {param-2.4.0a0 → param-2.4.0a1}/.gitignore +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/LICENSE.txt +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/README.md +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/numbergen/__init__.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/param/__init__.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/param/_utils.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/param/depends.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/param/display.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/param/ipython.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/param/parameters.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/param/py.typed +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/param/reactive.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/param/serializer.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/param/version.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/pyproject.toml +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/__init__.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/conftest.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testaddparameter.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testbind.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testbooleanparam.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testbytesparam.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testcalendardateparam.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testcalendardaterangeparam.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testcallable.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testclassselector.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testcolorparameter.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testcomparator.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testcompositeparams.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testcustomparam.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testdateparam.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testdaterangeparam.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testdefaultfactory.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testdefaults.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testdeprecations.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testdynamicparams.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testfiledeserialization.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testfileselector.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testimports.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testipythonmagic.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testjsonserialization.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testlist.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testlistselector.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testmultifileselector.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testnumbergen.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testnumberparameter.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testnumpy.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testobjectselector.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testpandas.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testparamdepends.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testparameter.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testparameterizedrepr.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testparamoutput.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testparamunion.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testpathparam.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testpickle.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testrangeparameter.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testreactive.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testrefs.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testreprhtml.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testselector.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testsignatures.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/teststringparam.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testtimedependent.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testtupleparam.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testutils.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testversion.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/testwatch.py +0 -0
- {param-2.4.0a0 → param-2.4.0a1}/tests/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: param
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.0a1
|
|
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,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.4.
|
|
22
|
-
__version_tuple__ = version_tuple = (2, 4, 0, '
|
|
21
|
+
__version__ = version = '2.4.0a1'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 4, 0, 'a1')
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -5617,15 +5617,7 @@ class _NS:
|
|
|
5617
5617
|
def __get__(self, obj: C | None, objtype: type[C]) -> Parameters:
|
|
5618
5618
|
if obj is None:
|
|
5619
5619
|
return objtype._param__parameters
|
|
5620
|
-
|
|
5621
|
-
ns = objdict.get("_param__parameters") if objdict is not None else None
|
|
5622
|
-
if ns is None:
|
|
5623
|
-
ns = Parameters(objtype, self=obj)
|
|
5624
|
-
if objdict is not None:
|
|
5625
|
-
objdict["_param__parameters"] = ns
|
|
5626
|
-
else:
|
|
5627
|
-
setattr(obj, "_param__parameters", ns)
|
|
5628
|
-
return ns
|
|
5620
|
+
return Parameters(objtype, self=obj)
|
|
5629
5621
|
|
|
5630
5622
|
|
|
5631
5623
|
class _PrivateNS:
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
import abc
|
|
3
3
|
import inspect
|
|
4
4
|
import re
|
|
5
|
+
import sys
|
|
5
6
|
import unittest
|
|
6
7
|
import warnings
|
|
8
|
+
import weakref
|
|
7
9
|
|
|
8
10
|
import param
|
|
9
11
|
import numbergen
|
|
@@ -1981,3 +1983,22 @@ def test_abc_basic_checks():
|
|
|
1981
1983
|
assert gc.l == [10]
|
|
1982
1984
|
gc.x += 1
|
|
1983
1985
|
assert gc.l == [10, 11]
|
|
1986
|
+
|
|
1987
|
+
|
|
1988
|
+
@pytest.mark.skipif(sys.implementation.name == "pypy", reason='Works differently on PyPy')
|
|
1989
|
+
def test_no_param_namespace_cycle():
|
|
1990
|
+
# Accessing .param on an instance must not create a reference cycle.
|
|
1991
|
+
# A cycle (obj -> obj.__dict__['_param__parameters'] -> Parameters.self -> obj)
|
|
1992
|
+
# would prevent CPython's reference-counting from immediately freeing the
|
|
1993
|
+
# object, breaking weakref-based cleanup used by libraries like HoloViews.
|
|
1994
|
+
class P(param.Parameterized):
|
|
1995
|
+
x = param.Number(1)
|
|
1996
|
+
|
|
1997
|
+
freed = []
|
|
1998
|
+
obj = P()
|
|
1999
|
+
ref = weakref.ref(obj, lambda _: freed.append(True)) # noqa: F841
|
|
2000
|
+
|
|
2001
|
+
_ = obj.param.values() # access .param to trigger any caching
|
|
2002
|
+
|
|
2003
|
+
del obj
|
|
2004
|
+
assert freed, "Parameterized instance not freed immediately — likely a reference cycle via .param"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|