Skip to content

Releases: holoviz/param

Version 2.4.1

09 Jun 13:18
2ec0571

Choose a tag to compare

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.List overloads to allow default type inference (#1149)

🏗️ Build

📚 Documentation

  • Add instructions about basedpyright to Typing docs (#1151)

🧹 Maintenance

  • Fix spelling mistakes and add typos to pre-commit (#1152)
  • Bump TY version (#1150)

Full Changelog

Version 2.4.0

09 Jun 13:13

Choose a tag to compare

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 Parameter generics (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.typed PEP 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 Parameter initialization (#1124)
  • Optimize Parameter instantiation (#1122)
  • Implement custom __copy__ for Parameter to speed up instance Parameter creation (#1128)

🐛 Bug Fixes

  • Use re.search for param.String regex check (#1142)

📚 Documentation

  • Add Typing user guide (#1139)

🧪 Tests & CI

  • Add tests/assert_types.py with assert_type() assertions verified in CI (#1066)
  • Add CI jobs for mypy, pyright, pyrefly, and ty (#1066, #1140)
  • Add zizmor for GitHub Actions security scanning (#1143)

Version 2.3.3

02 Apr 07:29
1cc8020

Choose a tag to compare

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 rx inputs are reused (#1117)

Full Changelog

Version 2.3.2

11 Feb 11:09
359d81b

Choose a tag to compare

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)

Full Changelog

Version 2.3.1

25 Nov 10:29
8ad25ad

Choose a tag to compare

This patch release fixes a regression introduced in the param.parameterized.edit_constant context manager.

Fixes:

  • Fix edit_constant to prevent class value mutation when not constant

Full Changelog

Version 2.3.0

14 Nov 09:59
54da93e

Choose a tag to compare

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_factory attribute to the base Parameter (#1092)
  • Add a metadata attribute 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 AttributeError when attempting to set the value attribute of a reactive expression (#1022)
  • Add an is_instance attribute to the List Parameter (#1023)
  • Allow depends(..., on_init=True) to be applied to async method (#1067)
  • Add concrete keyword to the descendents function => Prefer concrete(<cls>, descendents=True) over concrete_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 descendents on an object() instance (#1024)
  • Ensure edit_constant resets class and instance level parameters (#1015)
  • Ensure constant attribute 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_refs when updating another ref (#1061)
  • Fix error message of ReactiveESMMetaClass (#1064)
  • Fix reactive_ops.__call__ (#1069)
  • unwatch no 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_defaults function (#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
`...
Read more

Version 2.2.1

11 Jun 15:12

Choose a tag to compare

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)

Full Changelog

Version 2.2.0

17 Dec 10:19
f4c0041

Choose a tag to compare

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 depends and accept_arguments decorators (#962)
  • Stop directly importing numpy and add gen_types decorator (#966)

Bug Fixes:

  • Added missing super().__init_subclass__ call in _ParameterBase.__init_subclass__ (#969)
  • Remove _dict_update (#980)

Documentation:

  • Improve some docstrings and set up ruff to validate them (#977, #982, and #983)

Breaking changes / Deprecations:

  • Remove _param_watchers, raise RuntimeError on unsafe ops during init, and failed validation of a parameter default after inheritance (#973)
  • Promote many deprecation warnings to future warnings (#974)

Compatibility:

  • Test Python 3.13 (#971)
  • Drop Python 3.8 support (#986)

Infrastructure / Tests:

  • Replace hatch with pixi (#971)
  • Fix reactive tests failing intermittently on Windows (#971, #967)
  • Change linting to ruff (#978)

Full Changelog

Version 2.1.1

25 Jun 10:43
14771ab

Choose a tag to compare

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._callback resolves 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_ops on Python 3.12 (#946)

Full Changelog

Version 2.1.0

22 Mar 08:44
dae8fc4

Choose a tag to compare

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_ and updating (#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.update context manager restore refs (#915)
  • Avoid overeager root invalidation on rx leading to unnecessary evaluation (#919)

Deprecations

  • Passing positional arguments to Parameter now raises a ParamDeprecationWarning (#921)