Skip to content

v0.8.0

Choose a tag to compare

@openfeaturebot openfeaturebot released this 23 Oct 22:43
199876a

0.8.0 (2026-10-23)

⚠ BREAKING CHANGES

  • make hook inputs immutable (#357)

Bug Fixes

Migrating from 0.7.x

#357 makes hook inputs immutable (spec 4.1.3, 4.1.4.1 and 4.2.2). A hook that only reads its inputs needs no change. You need to change your code if you do one of the following:

  • Change the evaluation context after the before stage. Only before hooks can change it. Either return an EvaluationContext, which the SDK merges in, or assign hook_context.evaluation_context. In after, error and finally, the context is a frozen copy, so assigning it or writing to its fields raises FrozenError. That is handled like any other hook error, so in after the evaluation returns the default.
  • Change the other hook inputs in place. The flag key, the default value, the hints and the provider metadata are now frozen copies, and that includes nested hint values. Make your own copy before changing one. In return, the SDK no longer freezes the default value you pass in.
  • Call HookExecutor#execute directly. It now requires a default_value: keyword.
  • Freeze an EvaluationContext yourself. EvaluationContext#freeze now freezes its fields too.

0.8.1 tightens this further and fixes the cases that could still break:

  • only the spec's value types are copied, and other objects in the context are passed to hooks as they are;
  • times stay convertible with utc and localtime;
  • NotImplementedError from hooks, handlers and providers is handled.

Upgrading straight to 0.8.1 is recommended.