Skip to content

Releases: holoviz/param

Version 2.2.0

17 Dec 10:19
f4c0041
Compare
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
Compare
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
Compare
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)

Version 2.0.2

17 Jan 14:53
594c02e
Compare
Choose a tag to compare

This patch release fixes a few bugs and introduces a performance enhancement. Many thanks to @alfredocarella for their first contribution, and to the maintainers @maximlt and @philippjfr for contributing to this release.

Optimization:

  • Minor optimizations in hot codepaths accessing class parameters (#893)

Bug fixes:

  • Unpack partial callables in iscoroutinefunction (#894)
  • Fix building Param with setuptools-scm<7 (#903)

Documentation:

  • Replace Google Analytics with GoatCounter (#895)
  • Fix a typo in Outputs.ipynb (#892)

Full Changelog

Version 2.0.1

12 Jan 07:20
eaa106b
Compare
Choose a tag to compare

This minor release fixes a number of bugs, including a regression introduced by the replacement of the build backend (setuptools for hatchling) which led to the doc folder being wrongly packaged. Many thanks to @SultanOrazbayev for their first contribution, to @musicinmybrain for spotting the regression and submitting fixes, and to the maintainers @hoxbro, @jbednar and @maximlt for contributing to this release.

Bug fixes:

  • Do not install doc folder in site-packages (#878)
  • Drop the feather-format test dependency (#879)
  • Add tables to the tests-deser extra (#880)
  • Fix _state_push and _state_pop (#884)
  • version.py: new process should not create a window on Windows (#882, #886)
  • Don't import setuptools_scm if the .git folder doesn't exist (#885)

Documentation:

  • Add migration guide to Param 2.0 (#883)
  • Update Parameter API reference (#881)

Full Changelog

Version 2.0.0

24 Oct 13:42
b6a285b
Compare
Choose a tag to compare

20 years after its creation, Param has reached version 2.0! Can you guess when Param 3.0 will be released?

Param 2.0 is a major new release available for Python 3.8 and above, significantly streamlining, simplifying, and improving the Param API. Many long-supported but also long-obsolete functions, methods, and usages will now warn loudly so that you can make sure your code is only using the fully supported and safe current approaches. Because upgrading to Param 2 is likely to reveal compatibility issues with older codebases, new releases in the 1.x series are expected to continue for some time, focused on compatibility with the ecosystem rather than adding new features. Thus you can keep using Param 1.x with your older code, but Param 2 is the future!

We would like to thank @minimav for their first contribution, and @droumis, @hoxbro, @jbednar, @maximlt, @philippjfr and @sdrobert for their contributions. We would also like to thank @ceball, who made the first plans for Param 2.0 quite a few years ago, and we are glad to be delivering on them at last!

Major enhancements and features

  • Parameter slot values are now all inherited correctly across a hierarchy of Parameterized classes, making their behavior much clearer and more consistent. Let's say we have class B being a subclass of A, itself being a subclass of param.Parameterized. If A defines x = Number(1, bounds=(0, 10)) and B defines x = Number(2), B.param['x'].bounds is now going to be inherited from A and equal to (0, 10) as you would expect. Parameterized classes have always supported inheritance, but the previous mechanism was based on using None to indicate which values should be inherited, which was highly problematic because None was also a valid value for many slots. All Parameter slot signatures now default to the new Undefined sentinel, finally allowing None to be inherited where appropriate. (#605, #771, #791, #874)
  • The objects slot of a Selector was previously highly confusing, because it accepted either a dictionary or a list for initialization but then was accessible only as a list, making it difficult to watch or update the objects. There is now a ListProxy wrapper around Selector.objects (with forward and backward compatibility) to easily update objects and watch objects updates (#598, #825)
  • Parameterized classes and instances now have a rich HTML representation that is displayed automatically in a Jupyter/IPython notebook. For a class or instance p, just return p.param in a notebook cell to see a table of all the Parameters of the class/instance, their state, type, and range, plus the docstring on hover. It is likely we will improve the content and design of this repr based on feedback, so please let us know what you think! (#425, #781, #821, #831)
  • Parameters have all gained the allow_refs and nested_refs attributes, bringing an exceptionally useful feature that was available in Panel since version 1.2 to Param. Declaring a Parameter with allow_refs=True (False by default) allows setting this Parameter value with a reference to automatically mirror the value of the reference. Supported references include class/instance Parameter objects, functions/methods decorated with param.depends, reactive functions and expressions, asynchronous generators and custom objects transformed into a valid reference with a hook registered with param.parameterized.register_reference_transform. nested_refs indicate whether references should be resolved even when they are nested inside a container (#843, #845, #849, #865, #862, #876)
  • Experimental new rx reactive expressions: Param is widely used for building web apps in the HoloViz ecosystem, where packages have added various mechanisms for dynamic updates (e.g. pn.bind and pn.depends in Panel, and .interactive in hvPlot). These mechanisms were already built on Param and can be used far more widely than just in those packages, so that functionality has now been generalized, streamlined, and moved into Param. Nearly any Python expression can now be made reactive with param.rx(), at which point it will collect and be able to replay any operations (e.g. method calls) performed on them. This reactive programming approach lets you take just about any existing Python workflow and replace attributes with widgets or other reactive values, creating an app with fine-grained user control without having to design callbacks, event handlers, or any other complex logic! rx support is still experimental while we get feedback about the API, packaging, and documentation, but it's fully ready to try out and give us suggestions!
    (#460, #842, #841, #844, #846, #847, #850, #851, #856, #860, #854, #859, #858, #873)

Enhancements

  • Parameter slot values that are set to mutable containers (e.g. Selector(objects=a_list)) will now be shallow-copied on instantiation, so that the container is no longer confusingly shared between the class and its subclasses and instances (#826)
  • To further clean up the Parameterized namespace (first started in version 1.7.0), the remaining private attributes haven been collected under two private namespaces _param__private and _param__parameters (#766, #790)
  • You can now use .param.update as a context manager for applying temporary updates (#779)
  • The name Parameter has always had special behavior dating to its use in labeling objects in a GUI context, but this behavior is now able to be overriden at the class and instance level (#740)
  • Improved Parameter signatures for static and dynamic code analysis (#742)
  • Removed inferred Parameterized docstring signature and add basic __signature__ support (#802)
  • For speed, only generate the Parameter docstring in an IPython context (#774)
  • Improve Parameter validation error messages (#808)
  • Support for deserialization of file types into Array and DataFrame (#482)
  • Integer now accepts numpy.integer values (#735)
  • Range now does stricter validation of the slot values (#725, #824)
  • Path now has check_exists attribute, leading it to raise an error if path is not found on parameter instantiation (#800)
  • Add top-level __all__ and move Parameter classes to parameters.py (#853)

Bug fixes

  • Allow type change for DateRange and Date (#733)
  • Ensure class watchers are not inherited by instance parameter (#833)
  • Fix multi-level indirection in Parameters access (#840)
  • Ensure non-function types are not resolved as empty function declarations (#753)
  • Fix watchers support when the Parameterized instance is falsy (#769)
  • Fix depending on the method of a sub-parameter object (#765)
  • Raise an error on bad non-watched references (#777)
  • Ensure that the root dependency can be resolved, and error otherwise (#813)
  • Fix basic pickling (#783, #792)
  • Validate that self is present in the __init__ signature of a Parameterized class (#786)
  • No longer force instantiate to True when constant is True (#776)
  • Instantiate default Parameter values based on all the Parameters available (#798)
  • Array: fix param.pprint (#795)
  • Array: don't hard-code allow_None to True (#726)
  • Boolean: validate the default type ([#722](https://git...
Read more

Version 1.13.0

14 Mar 09:22
782a03c
Compare
Choose a tag to compare

The 1.13.0 is the last release of Param before the 2.0 release. However, Param 1.13 is meant to receive long-term support; security patches and fixes to critical bugs are planned to be backported to the 1.13.x series.

This release includes a new Bytes Parameter and a few important bug fixes. This release is also marked by the adoption of a formal project governance, ensuring Param's future as a healthy open-source project. Many thanks to @ovidner and @droumis for their first contributions! And to @maximlt, @hoxbro, @jlstevens, @philippjfr and @jbednar for their continuing support to fixing and improving Param.

Bug fixes:

  • Fix copying when having watchers on e.g. bounds on inherited Parameter types (#675)
  • Allow JSON serialization to work with json.dumps (#655)
  • ListSelector restricted to list type objects (#531)
  • Fix depends async wrapper (#684)
  • Allow named colors to be any case (#711)

New features:

  • Add Bytes parameter (#542)

Documentation:

  • Fix param module link (#682)

Project governance:

  • Create initial project governance docs (#674)

Maintenance:

  • Rename master branch to main (#672)
  • Add more tests (#710)
  • Various CI related fixes (#680, #683 and #709)

Version 1.12.3

09 Dec 08:38
897687f
Compare
Choose a tag to compare

The 1.12.3 release adds support for Python 3.11. Many thanks to @musicinmybrain (first contribution!) and @maximlt for contributing to this release.

Enhancements:

  • Preserve existing Random seed behavior in Python 3.11 (#638)
  • Add support for Python 3.11 (#658)

Version 1.12.2

24 Jun 09:47
1046229
Compare
Choose a tag to compare

The 1.12.2 release fixes a number of bugs and adds support again for Python 2.7, which was unfortunately no longer supported in the last release. Note however that Param 2.0 will still drop support of Python 2.7 as already announced. Many thanks to @hoxbro and the maintainers @jbednar, @jlstevens, @maximlt and @philippjfr for contributing to this release.

Bug fixes:

  • Match against complete spec name when determining dynamic watchers (615)
  • Ensure async functionality does not cause python2 syntax errors (624)
  • Allow (de)serializing CalendarRange and DateRange Parameters (625)
  • Improve DateRange validation (627)
  • Fix regression in @param.depends execution ordering (628)
  • Ensure named_objs does not fail on unhashable objects (632)
  • Support comparing date-like objects (629)
  • Fixed BinaryPower example in the docs to use the correct name EvenInteger(634)

Version 1.12.1

31 Mar 15:43
Compare
Choose a tag to compare

The 1.12.1 release fixes a number of bugs related to async callback handling when using param.depends and .param.watch and a number of documentation and error messages. Many thanks to @hoxbro and the maintainers @jbednar, @jlstevens, @maximlt and @philippjfr for contributing to this release.

Error handling and documentation:

  • Fixed description of shared_parameters (#568)
  • Improve the error messages of Date and DateRange (#579)
  • Clarified step error messages and other docs and links (#604)

Bug fixes:

  • Make iscoroutinefunction more robust (#572)
  • Fix for handling misspelled parameter (#575)
  • Handle None serialization for Date, CalendarDate, Tuple, Array, and DataFrame (#582)
  • Support async coroutines in param.depends (#591)
  • Handle async functions in depends with watch=True (#611)
  • Avoid equality check on Watcher (#612)

Documentation:

  • Fix binder (#564)
  • Fixed description of shared_parameters (#568)