Skip to content

Releases

Release 0.1.4

Choose a tag to compare

@dmitriplotnikov dmitriplotnikov released this 06 Nov 02:04

Release notes for CEL Python (cel-expr-python) version 0.1.4

Key Highlights

  • Lists Extension Library (ext_lists): Added bindings for the standard CEL lists extension library (cel_expr_python.ext.ext_lists.ExtLists()), providing functions such as lists.range(), slice(), flatten(), distinct(), reverse(), and sort().
  • Python 3.10 & Free-Threaded Python Support: Expanded wheel compatibility to include Python 3.10 (alongside 3.11–3.14) and enabled free-threaded Python (Py_GIL_DISABLED) support with multi-threaded compilation and evaluation concurrency improvements.
  • Pratt Parser Enabled by Default & Environment Options: Added cel.Options (passed via cel.NewEnv(options=...)) and enabled the CEL Pratt parser (enable_pratt_parser=True) by default:
from cel_expr_python import cel
from cel_expr_python.ext import ext_lists

env: cel.Env = cel.NewEnv(
    extensions=[ext_lists.ExtLists()],
    options=cel.Options(enable_pratt_parser=True),
)
res: cel.Value = env.compile("lists.range(4)").eval()
  • Stability & Packaging Improvements:
    • Upgraded cel-cpp to v0.17.0 and updated cel-spec conformance coverage.
    • Resolved AB-BA deadlocks between the Python GIL and C++ DescriptorPool / runtime mutexes during multi-threaded compilation and evaluation.
    • Ensured evaluated cel.Value instances safely outlive cel.Expression by cloning values onto the evaluation arena.
    • Hardened PyPI wheel packaging to include .pyi type stubs for all extension modules while excluding test files.

Full Changelog: v0.1.3...v0.1.4

Release 0.1.3

Choose a tag to compare

@dmitriplotnikov dmitriplotnikov released this 25 Jun 23:29

Release notes for CEL Python (cel-expr-python) version 0.1.3

Key Highlights

  • Platform Compatibility Expansion: Added support for linux/arm64, macos/x86 and the following versions of Python: 3.11, 3.12, 3.13 and 3.14 for all supported platforms.
  • YAML configuration parser: Added support for YAML-formatted CEL environment configuration:
config: cel.EnvConfig = cel.NewEnvConfigFromYaml("""
  variables:
    - name: two
      type: int
      value: 2
  extensions:
    - name: math
    - name: strings
  """)
env: cel.Env = cel.NewEnv(config=config)
res: cel.Value = env.compile("'%.4f'.format([math.sqrt(two)])").eval()

Full Changelog: v0.1.2...v0.1.3

Release 0.1.2

Choose a tag to compare

@dmitriplotnikov dmitriplotnikov released this 29 May 03:52

Release notes for CEL Python (cel-expr-python) version 0.1.2

Key Highlights

  • Platform Compatibility Expansion: Initial support for Microsoft Windows and macOS environments, complete with dedicated CI/CD presubmit pipelines and automated wheel releases using cibuildwheel.
  • Expression Container Aliases & Abbreviations: Added support for namespace resolution in the environment via the new cel.ExpressionContainer class.
  • Simplified User-defined Functions: Enabled registration of custom functions written in Python directly via cel.NewEnv(functions=[...]).
  • Type Stub Annotations (.pyi): Added robust inline type stubs for improved IDE auto-completion and static type checking.

Detailed Change Log

1. Multi-Platform & Build Infrastructure Support

  • Windows Support: Added Microsoft Windows build support. Configured modern C++ standards compilation (/std:c++20) for MSVC compiler.
  • macOS Support: Configured Apple macOS build pipeline.
  • cibuildwheel Optimization: Updated release scripts to support Python 3.11, 3.12, 3.13, and 3.14 wheel compiles.

2. Namespace Resolution (cel.ExpressionContainer)

  • Container Aliases: Added cel.ExpressionContainer class to pass to cel.NewEnv(container=...). Allows binding aliases to fully qualified names (e.g., aliases={"abc": "x.y.bar"}) and defining namespace abbreviations.

3. Custom Functions Declarations

  • cel.FunctionDecl & cel.Overload: Added dedicated classes for custom function binding. You can now define custom behaviors and overload resolutions in Python:
    cel_env = cel.NewEnv(
        functions=[
            cel.FunctionDecl("hello", [
                cel.Overload("hello(string)", cel.Type.STRING, [cel.Type.STRING], impl=lambda x: f"Hello {x}!")
            ])
        ]
    )
  • Separate Implementation Binding: Supported binding overloads dynamically using NewEnv(functions=[...], function_impls={"overload_id": handler}).

4. Extension Changes & Refactoring

  • ext_strings Renaming: Renamed Python strings extension from ext_string to ext_strings to align with internal conventions.
  • Compiler Library Migration: Refactored C++ extension interface from using ConfigureCompiler to returning cel::CompilerLibrary via GetCompilerLibrary(), harmonizing between standard and custom extension definitions.

Full Changelog: v0.1.1...0.1.2---

Initial release of CEL-expr-python

Pre-release

Choose a tag to compare

@dmitriplotnikov dmitriplotnikov released this 13 Feb 00:43

Initial release of CEL-expr-python, wrapper over CEL-C++

Features:

  • Compilation
  • Evaluation of a type-checked expression
  • Support for Protobuf
  • Standard extensions: math, strings, optional, bindings etc
  • Support for custom extensions, written in Python or C++