Releases: holoviz/param
Version 2.4.1
This patch release adds a mypy plugin to handle the descriptor __set__ type narrowing issue, reorders param.List overloads to allow default type inference, and fixes the conda build.
Many thanks to @philippjfr and @hoxbro for their contributions to this release.
🚀 Features
- Add mypy plugin to handle descriptor
__set__issue (#1148)
🐛 Bug Fixes
- Reorder
param.Listoverloads to allow default type inference (#1149)
🏗️ Build
- Fix conda build (b7bcd74)
📚 Documentation
- Add instructions about basedpyright to Typing docs (#1151)
🧹 Maintenance
Version 2.4.0
Param 2.4.0 brings first-class static typing support to the entire Param ecosystem — all major parameter types now carry precise type information that flows through to your IDE and type checker, with types inferred directly from your existing parameter declarations. The release also adds a lazy mode to reactive expressions (rx) and includes performance optimizations that speed up parameter initialization in large class hierarchies.
Many thanks to @philippjfr, @hoxbro and @camriddell for their contributions to this release.
🚀 Features
- Implement descriptor factory typing system by implementing
Parametergenerics (Parameter[_T]) and add typed overloads for all major Parameter subclasses and add typing for public APIs (#1066, #1112, #1130, #1131, #1132, #1134, #1136, #1137, #1141) - Add
py.typedPEP 561 marker so type checkers automatically recognize Param's inline annotations without requiring separate stubs (#1066) - Add
rx(..., lazy=)argument (#1106)
⚡ Performance
- Add caches to speed up
Parameterinitialization (#1124) - Optimize
Parameterinstantiation (#1122) - Implement custom
__copy__forParameterto speed up instanceParametercreation (#1128)
🐛 Bug Fixes
- Use
re.searchforparam.Stringregex check (#1142)
📚 Documentation
- Add Typing user guide (#1139)
🧪 Tests & CI
Version 2.3.3
This patch release fixes an issue where rx pipelines with shared provenance would not use a shared cache, resulting in unnecessary re-evaluation of shared inputs.
Fixes:
- Ensure shared
rxinputs are reused (#1117)
Version 2.3.2
This patch release fixes a regression introduced in Parameterized by adding a docstring to its __init__ method, shadowing user-defined class docstrings displayed in IDEs like VSCode.
Fixes:
- Remove Parameterized
__init__docstring as it shadows class user docstrings (#1104)
Compatibility / Tests:
- Pandas 3 test suite compatibility (#1107)
Version 2.3.1
This patch release fixes a regression introduced in the param.parameterized.edit_constant context manager.
Fixes:
- Fix
edit_constantto prevent class value mutation when not constant
Version 2.3.0
This minor release brings a number of new features, enhancements, bug fixes, and documentation improvements. Notably, it introduces the new Parameter attributes default_factory and metadata, and the ParameterizedABC class to declare Parameterized abstract base classes. All the docstrings have been improved thanks to a massive effort from @MarcSkovMadsen. Several deprecated APIs have now been removed, and the minimum supported Python version has been bumped to 3.10. Many thanks to our new contributors @Azaya89, @Coderambling, and @ypsah, as well as to @MarcSkovMadsen, @hoxbro, @maximlt, @philippjfr, and all others for their continued maintenance and development efforts.
Features:
- Add a
default_factoryattribute to the base Parameter (#1092) - Add a
metadataattribute to the base Parameter (#1094) - Allow declaring Parameterized abstract base classes by inheriting from
ParameterizedABC=> This approach should be favored over__abstract = True(#1031) - Add
.rx.set()method (#957)
Enhancements:
- Add missing docstrings and enhance existing ones (#992, #994, #997, #998)
- Better error when calling
len()on a reactive expression (#1033) - Raise
AttributeErrorwhen attempting to set thevalueattribute of a reactive expression (#1022) - Add an
is_instanceattribute to theListParameter (#1023) - Allow
depends(..., on_init=True)to be applied to async method (#1067) - Add
concretekeyword to thedescendentsfunction => Preferconcrete(<cls>, descendents=True)overconcrete_descendents(<cls>)(#1027)
Performance Enhancements:
- Improve import time by lazy importing "slow" modules (#1037)
- Only update Parameter signatures when needed (#1038)
Bug Fixes:
- Fix calling
descendentson anobject()instance (#1024) - Ensure
edit_constantresets class and instance level parameters (#1015) - Ensure
constantattribute is inherited (#1017) - Ensure type checkers skip
ParameterizedFunction.__init__(#1039) - Fix
.values()/get_value_generator()dealing with Dynamic params and an updated default value (#1058) - Do not remove
nested_refswhen updating another ref (#1061) - Fix error message of
ReactiveESMMetaClass(#1064) - Fix
reactive_ops.__call__(#1069) unwatchno longer logs a warning and idempotent behavior clarified (#1018)- Remove bad abstract declaration on
SelectorBase(#1086) - Do not override refs when parameter is triggered (#1089)
Documentation:
- Add a new page that lists deprecated and removed APIs (#1016)
- Add a version switcher (#1079)
- Small refactor and fixes to the API reference (#1082)
- README and landing page updates (#1095)
- Various minor fixes and improvements (#1006, #1034, #1036, #1049, #1052, #1054)
Breaking changes:
- Direct removal of the undocumented and broken
print_all_param_defaultsfunction (#1029) - API removals that emitted a deprecation warning since 2.0.0, all included in the table below (#1085)
| Warning | Description |
|---|---|
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0 |
Parameter slots / List._class: use instead item_type |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0 |
Parameter slots / Number.set_hook: no replacement |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0 |
param.__init__ module / param.produce_value: no replacement |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0 |
param.__init__ module / param.as_unicode: no replacement |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0 |
param.__init__ module / param.is_ordered_dict: no replacement |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0 |
param.__init__ module / param.hashable: no replacement |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0 |
param.__init__ module / param.named_objs: no replacement |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0 |
param.__init__ module / param.normalize_path: no replacement |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0 |
param.__init__ module / param.abbreviate_paths: no replacement |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0 |
param.parameterized module / param.parameterized.all_equal: no replacement |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0 |
param.parameterized module / param.parameterized.add_metaclass: no replacement |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0 |
param.parameterized module / param.parameterized.batch_watch: use instead batch_call_watchers |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0 |
param.parameterized module / param.parameterized.recursive_repr: no replacement |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0 |
param.parameterized module / param.parameterized.overridable_property: no replacement |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 |
Parameterized .param namespace / .param.set_default: use instead for k,v in p.param.objects().items(): print(f"{p.__class__.name}.{k}={repr(v.default)} |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 |
Parameterized .param namespace / .param._add_parameter: use instead .param.add_parameter |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 |
Parameterized .param namespace / .param.params: use instead .param.values() or .param['param'] |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 |
Parameterized .param namespace / .param.set_param: use instead .param.update |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 |
Parameterized .param namespace / .param.get_param_values: use instead .param.values().items() (or .param.values() for the common case of dict(....param.get_param_values())) |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 |
Parameterized .param namespace / .param.params_depended_on: use instead .param.method_dependencies |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 |
Parameterized .param namespace / .param.defaults: use instead {k:v.default for k,v in p.param.objects().items()} |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 |
Parameterized .param namespace / .param.print_param_defaults: use instead for k,v in p.param.objects().items(): print(f"{p.__class__.name}.{k}={repr(v.default)}") |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 |
Parameterized .param namespace / .param.print_param_values: use instead for k,v in p.param.objects().items(): print(f"{p.__class__.name}.{k}={repr(v.default)}") |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 |
Parameterized .param namespace / .param.message: use instead .param.log(param.MESSAGE, ...) |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 |
Parameterized .param namespace / .param.verbose: use instead .param.log(param.VERBOSE, ...) |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 |
Parameterized .param namespace / .param.debug: use instead .param.log(param.DEBUG, ...) |
ParamFutureWarning since 2.2.0, ParamDeprecationWarning since 2.1.0, ParamPendingDeprecationWarning since 2.0.0 |
Instantiating most parameters with positional arguments beyond default is deprecated |
| `... |
Version 2.2.1
This patch release contains a bug fix for nested references. Thanks to @philippjfr for their contribution.
Bug Fixes:
- Do not remove nested_refs when updating another ref (#1061)
Version 2.2.0
This minor release brings a few enhancements and bugfixes. Importantly, it includes some breaking changes, removing deprecated APIs or raising errors during unsafe operations which would previously only emit warnings. Many thanks to @gandhis1 and @JRRudy1 for their first contributions, and to @hoxbro, @maximlt,and @MarcSkovMadsen for their continued maintenance and development efforts.
Enhancements:
- Annotate
dependsandaccept_argumentsdecorators (#962) - Stop directly importing numpy and add
gen_typesdecorator (#966)
Bug Fixes:
- Added missing
super().__init_subclass__call in_ParameterBase.__init_subclass__(#969) - Remove
_dict_update(#980)
Documentation:
Breaking changes / Deprecations:
- Remove
_param_watchers, raiseRuntimeErroron unsafe ops during init, and failed validation of a parameter default after inheritance (#973) - Promote many deprecation warnings to future warnings (#974)
Compatibility:
Infrastructure / Tests:
Version 2.1.1
This minor release contains bug fixes for reactive expressions and a few minor documentation improvements. Thanks to @jrycw for their first contribution! And to @ahuang11, @maximlt, and @philippjfr for their continued maintenance and development efforts.
Bug fixes:
- Ensure
rx._callbackresolves accessors (#949) - Ensure refs can be updated by watcher of the same parameter (#929)
- Recursively resolve references on args and kwargs passed to a reactive operation (#944)
- Only override the name of a Parameterized instance on Parameter instantiation when
instantiate=True(#938)
Documentation:
Maintenance:
- Fix
test_reactive_logic_unary_opson Python 3.12 (#946)
Version 2.1.0
This minor release focuses on improving reactive expressions and support for asynchronous (and synchronous) generators. Many thanks to @maximlt, @hoxbro and @philippjfr for their continued maintenance and development efforts.
Enhancements
- Improvements for synchronous and asychronous generators (#908)
- Additions to the .rx namespace including
and_,bool,map,not_,or_andupdating(#906) - Add support for adding asynchronous watcher to
rx(#917) - Make it possible to resolve reactive expressions recursively with
.rx.resolve(#918) - Add support for async and generator functions in
.rx.pipe(#924)
Bug fixes
- Ensure that
.param.updatecontext manager restore refs (#915) - Avoid overeager root invalidation on
rxleading to unnecessary evaluation (#919)
Deprecations
- Passing positional arguments to
Parameternow raises aParamDeprecationWarning(#921)